Download OSs-Micrium-Learning Centre-Application Notes
Transcript
Micriµm µC/OS-II and µC/Probe for the NXP LPC2478 CPU Task Name App_TaskStart() “Start Task” App_TaskKbd() “Keyboard” App_TaskProbeStr() “Probe Str” App_TaskJoy() “Joystick” App_TaskSer () “Serial RS232 “Probe OS PlugIn” Priority Function 1 Starts µC/OS-Probe; reads ADCs, blinks LEDs. 2 Reads status of push buttons; passes IDs of pressed buttons to App_TaskStart() in a queue. 3 Outputs strings to the Windows µC/Probe program 4 Increment/decrement the state of the system screens base on the joystick status. 5 Outputs information through the RS-232 port 6 Updates CPU usage for µC/Probe. “Probe RS-232” 11 Parses packets from µC/Probe. “uC/OS-II Tmr” 29 Manages µC/OS-II timers “uC/OS-II Stat” 30 Collect stack usage statistics “uC/OS-II Idle” 31 Executes when no other task is executing. Table 2-1. Example Application Tasks The project is configured so that code is loaded into Flash and the stacks and data are loaded into RAM, as shown in Table 2-2. Size Memory Range 0x00000000- 0x0007FFFF Segment(s) 512 kB Code (in Flash) 0x40000000- 0x4000FFFF 64 kB Stacks and data (in RAM) Table 2-2. Example Application Tasks UART2 µC/OS-Probe Accelerometer X Accelerometer Y 2 I C0 (0.27, P0.28) LPC2478 Accelerometer Z Potentiometer B1 B2 PCA9532 UART0 B3 B4 Serial Output HyperTerminal Joystick LED1 LED2 LED3 LED4 Figure 2-4. Example Application Hardware Use 14