Project Name: MultiQCallback 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 two general purpose timers to illustrate how to set up two separate deferred callback queues. Each timer and each callback has its own interrupt vector group, (IVG) though the interrupt manager allows interrupt handlers to be chained on a single IVG. When the program starts, it initializes and sets up the interrupt manager, callback manager, and timer manager. It hooks two interrupt for the timers, enables them, creates two callback queues using two different interrupts, initializes the timers and then loops infinitely. The two timers use different time periods, so that the timer 0 interrupt occurs at twice the frequency of the timer 1 interrupt. When timer 0 expires interrupt manager calls the interrupt handler for timer 0, which toggles the second LED and posts a callback. The callback routine (callback 0) toggles the first LED. The two LED's appear to toggle simultaneously. When timer 1 expires interrupt manager calls the interrupt handler for timer 1, which toggles the fourth LED and posts a callback. The callback routine (callback 1) toggles the third LED. The two LED's appear to toggle simultaneously. When the program executes, the first two LEDs will blink twice as fast as the second two LEDs. File Structure: "./MultiQCallback.dpj" - Main project file "./MultiQCallback.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 "MultiQCallback.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.