2022-05-10 10:54 AM
I'm attempting to have my program run some code when a SPI transfer is complete using the RXNE flag. Setting the RXNEIE bit invokes SPI2_IRQHandler() as expected but it always results in a hard fault (CFSR register = 0x20000), without any additions to SPI2_IRQHandler().
I don't have much experience in debugging of this kind so any help/tips would be appreciated.
2022-05-10 12:00 PM
Perhaps break-point the code an step it?
Make sure all the call-back addresses in the structure are properly populated
2022-05-10 05:57 PM
Reading the spi data register and clearing the RXNE flag in the first line of the interrupt handler seems to have fixed it.