Project Name: PriorityCallback Project Type: ADSP-BF533 [ ] ADSP-BF537 [X] ADSP-BF561 [ ] Hardware Used: EZ-Kit Buttons and LEDs System Services Components Used: DMA Manager [ ] Deferred Callback Manager [X] Interrupt Manager [X] Timer Module [X] Power Management Module [ ] Flag Module [ ] External Bus Interface Unit Module [ ] Port Module [ ] Example Overview: This example uses general purpose timer 0 and sets up deferred callbacks with different priorities. If two or more callbacks are posted at the same time, the highest priority callback will be handled first, the second highest second and so on. When the program starts, it initializes and sets up the interrupt manager, the callback manager, and the timer manager. It hooks and enables an interrupt for the timer, creates a callback queue using a different interrupt, initializes timer 0, and loops infinitely. When a timer interrupt occurs, the handler posts 3 different callbacks, each of a different priority (low, medium, high). Each of the callbacks has corresponding LEDs. The high priority callback turns on the first LED, and toggles the fourth LED. The medium priority callback turns on the second LED, turns off the first LEd, and toggles the fifth. The low priority callback turns on the third LED, turns off the second, and toggles the sixth. As a result, the first two LED's will APPEAR to remain off, because they are turned off by a lower priority callback, immediately after they're turned on. The third LED will appear to remain on, and LED's 4, 5 and 6 will toggle, to show that all three callbacks are happening. File Structure: "./PriorityCallback.dpj" - Main project file "./PriorityCallback.c" - Main source file (common) "./ezkitutilities.c" - EZ-Kit utilities source file for Blackfin processors "./ezkitutilities.h" - EZ-Kit utilities include file for Blackfin processors System Configuration: Defaults External connections: None Getting Started: 1) Load Project file "PriorityCallback.dpj" 2) Build Project by selecting "Project->Rebuild Project" 3) Select "Debug->Run" 4) Observe the behavior described above. 5) When finished, select "Debug->Halt" to stop the program.