Dear Sirs,
In an application, an external GPIO Interrupt triggers the control of an SPI device. This means that the application would be running into the GPIO service routine and, at the same time, enabling the management of the SPI interrupts.
I’m working on nRF5_SDK_17.1.0 and using the SES IDE environment for a nRF52-DK HW.
I have been checking the signals using this nRF52-DK. I have verified that changing manually the interrupt pin, the device enters into the GPIO handler routine. Into this routine I manage the SPI device control. I see that the SPI generates the right clock and data signals in the execution of a nrf_drv_spi_transfer() function. After this, the program waits by calling the function wait_end_xfer_accel(), which tests for the flag that will be modified by the SPI interrupt. However, the SPI interrupt is not serviced and the flag is not modified. So, it looks like the SPI interrupts are not enabled while the GPIO irq is being serviced.
I have the GPIOTE interrupt level set to 3 in the sdk_config.h file (GPIOTE_CONFIG_IRQ_PRIORITY) and the SPI_IRQ_PRIORITY to value 2. I understand that the driver funtions in the nRF-SDK should manage this automatically, but it doesn’t work,
What could I be missing?
Thank you very much in advance.
Regards,
Joel