Hi,
I'm designing another style of synthesizer using the Maple (absolutely love the chip!).
I've currently got two interrupts that I want to prioritise. The audio write interrupt where a 16bit variable is placed into the SPI data registor (with a 16bit data frame format) and this section is working fine. This fires at 48kHz. The second interrupt fires at ~2048Hz (reduces division by sample rate to shifts) and is used for the envelope generators. This section of code also works fine.
The problem is: I want the audio writing interrupt to prioritise over the envelope generator interrupt to reduce audible glitches. I've tried doing this with nvic.h but changing the priority of the timer 1 interrupt to 1 and the timer 2 interrupt to 15 (timer 1 - audio, timer2 - envelope) yet this unfortunately still didn't cause the audio interrupt to fire over the envelope interrupt. To measure this, I've only got a pin toggle in the audio interrupt, in the envelope interrupt, I've got a time consuming section of code (a long for loop).
After an extremely brief stint with PIC microcontrollers, I know its possible to prioritise interrupts using their set of PIC32 chips, is this possible on the Maple?
Cheers,