2021-06-17 01:20 AM
I detect my source problem why the code is not working , when debugging using step into, during the execution of SPI_SendDataIT(), after it execute the return state line, The code is stuck at startup file at line b infinite loop. What is the cause of this problem?
The code stuck here:
What is the cause of this problem?
2021-06-17 04:36 AM
Which STM32?
Isn't that also the hardfault handler?
Do you have a proper interrupt service routine (ISR) defined for given SPI interrupt, with name matching that in the vector table?
JW
2021-07-03 11:03 PM
Here is how I initialize my gpio interrupt, im using PB6, when it detects LOW, the interrupt is at line EXTI9_5.
Then, this my IRQHandler:
So, my program, the SPI interrupt will trigger when data received in the RXFIFO, which means the event flag is RXNE.
But the problem is, when I sent dummy data to fetch the real data using SPI_SendDataIT function, the program goes to the default handler which is infinite loop. I suspect my code inside the SPI_SendDataIT is missing something but I did not know what it is. Here is my SPI_SendData function code:
This is how my SPI_SendDataIT is called: