2008-02-26 01:51 AM
Interrupt pending is not set when using SPI1
2011-05-17 03:25 AM
Hi,
I am having trouble with SPI1 and an external interrupt on PC6. I have configured a pin to generate an interrupt on Falling edge. This works fine until the Interrupt Falling edge collide with a SPI1 write/read (Which will happen from time to time) - When that happens my interrupt routine is not called, nor is the pending pit set. The SPI is unaffected, but the External Interrupt vector is not called. I have tried fooling around with different interrupt priorities, moving the external interrupt to another pin, disabling interrupt when entering the SPI function, but nothing seems to help. As far as I have been able to read. The pending bit should be set in all cases and when interrupts are enabled the pending interrupt should be executed? Any pointers or sample code that enable SPI & external interrupts will be greatly appriciated.. Best Regards Henrik Holm Ps. I am using the ST-Firmware library to configure the STM322011-05-17 03:25 AM
Located the error.. Was using the wrong registers to enable and disable interrupt.. Was much easier to locate when I found a 4 channel scope..
In order to disable interrupt I now use: NVIC->ICER[0] = 0xFFFFFFFF and to restore NVIC->ISER[0] = oldInterruptState That seems to solve my issue