2024-12-23 01:12 AM
We are trying to do SPI communication in the GPIO interrupt handler.
We are not sure about the following two points. Can someone please give me an answer?
1, If another GPIO interrupt occurs while the GPIO interrupt handler is running (with the same priority), does it wait for the GPIO interrupt handler running first to complete before running the later GPIO interrupt handler?
Or is the later GPIO interrupt ignored?
2,We would like to disable GPIO interrupts during SPI communication in order to perform SPI communication in the GPIO interrupt handler.
How should we write the program?
Solved! Go to Solution.
2024-12-23 02:18 AM
@pass3master wrote:
Five switches are connected to a CPU (microcontroller), and FPGA.
Our customer requests that SPI communication be performed between the CPU (microcontroller) and FPGA when a switch is pressed.
Each of the five switches performs different SPI communication, and the moment a switch is pressed, there is a possibility that the other switches will also be pressed.
For this reason, we are planning to detect switch changes via GPIO interrupts and perform SPI communication.
Make sure the EXT preemption priority has the same level for all buttons + use EXTI interrupt mask register to mask/unmask the interrupt: