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

not getting NRF_SPI_EVENT_READY event

Hi - In my app, I'm using Bluetooth, the ADC, the TWI, and the SPI. The general idea is to measure lots of things, store the data in SPI NOR FLASH, and occasionally flush some data through BLE. All is good initially, but when everything is up and running, subsequent calls to the SPI bus hang at

while (!nrf_spi_event_check(p_spi, NRF_SPI_EVENT_READY)) {}

This is with SDK 13.0 on an nRF52. What am I missing? Thanks!

Parents
  • Hi Bjoern - Sorry. Yes, I was starting SPI transactions from an app_timer (which is RTC1). I used the same app timer for both polling the sensors and storing the data. I.e., the app timer starts an SAADC conversion, polls the sensors on the TWI/I2C bus, and then tries to flush everything to the NOR FLASH on the SPI bus. My spi_config.irq_priority = 7, //APP_IRQ_PRIORITY_LOW. My SAADC_CONFIG_IRQ_PRIORITY is APP_IRQ_PRIORITY_LOW, and i2c_config.interrupt_priority = APP_IRQ_PRIORITY_LOW. On the 52, does APP_IRQ_PRIORITY_LOW default to 6 or 7?

Reply
  • Hi Bjoern - Sorry. Yes, I was starting SPI transactions from an app_timer (which is RTC1). I used the same app timer for both polling the sensors and storing the data. I.e., the app timer starts an SAADC conversion, polls the sensors on the TWI/I2C bus, and then tries to flush everything to the NOR FLASH on the SPI bus. My spi_config.irq_priority = 7, //APP_IRQ_PRIORITY_LOW. My SAADC_CONFIG_IRQ_PRIORITY is APP_IRQ_PRIORITY_LOW, and i2c_config.interrupt_priority = APP_IRQ_PRIORITY_LOW. On the 52, does APP_IRQ_PRIORITY_LOW default to 6 or 7?

Children
No Data
Related