INVSTATE hard fault with SPI interrupt handler. STM32F405
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Labels:
-
DEBUG
-
SPI
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-05-10 5: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.
