This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Are SPI interrupt disabled in GPIOTE handler?

I am writing code for nrf51822 with softdevice and an accelerometer is connected to the nrf chip. The accelerometer provides interrupt to nrf chip over GPIOTE whenever there is data available to read. Upon receiving the GPIOTE interrupt, I am reading accelerometer data over SPI using nrf_drv_spi_transfer() and the SPI event handler that I have written(This even handler is hit when read is completed).

Since I have 3 axis data I am calling nrf_drv_spi_transfer() 3 times from the GPIOTE handler(for reading x, y and z axis data). But the SPI even handler is never reached.

Are SPI interrupt disabled in GPIOTE handler? I have set APP_IRQ_PRIORITY_LOW to GPIOTE handler.

Related