ISR shadow register confusion
Sorry to bother you, but this pic32mz0512efe100 is a monster.
I have made basic configurations via the harmony framework. I have now set up the SPI with my own settings and it works.
But when I change the ISR definition from:
void _ISR (_SPI1_RX_VECTOR, ipl4AUTO) SPI_Handler (void)
void _ISR (_SPI1_RX_VECTOR, ipl4SRS) SPI_Handler (void)
the program crashes. I have set the IPL level to 4. I read somewhere in the Help-window that if SRS should be used, one must configurate the CPU so that a certain SRS will be assigned to a specific IPL level.
Now, I really don't get that AUTO setting. Even though there only are a couple of timer interrupts in my program, the compiler doesn't seem to use the shadow regs. What's the point with this AUTO thing, when in reality, software backups will be done to 100%?
For me, the choice of a pic32 comes to speed, and it seems totally insane to have interrupts that spends some 200 instructions on context savings.
Can some nice and clever person describe this for me? And perhaps give a hint of how I can make the device use the shadow registers. Thanks.