1.2.8 Integrating with Interrupts and an RTOS
The DSP Library may easily be integrated into an application which utilizes interrupts or an RTOS with certain guidelines. To minimize execution time, the DSP Library utilizes REPEAT loops, Modulo Addressing and Bit-Reversed Addressing. Each of these components is a finite hardware resource on the PIC32A device, and the background code must consider the use of each resource when disrupting execution of a DSP Library function.
When integrating with the DSP Library, make sure to examine the Function Profile of each function description to determine which resources are used. If a library function is to be interrupted, it shall be the user’s responsibility to save and restore the contents of all registers used by the function, including the state of the REPEAT and special addressing hardware. This also includes saving and restoring the contents of the CORCON and Status registers.