How does nrf_spi_event_check() not block when there's nothing received?

I'm porting code from my device which uses the nRF52832 to the 840 DK. My general process was to get the code developed on my own device to run on an 832 DK, then an 840 DK. My code attempts to talk to several external ICs which are not present on the DK. I expect there to be errors, but that my error-handling architecture is robust to them.

I've worked through several problems in my code when running on the DK, but the last was when I ran code on the 840 DK, and it hung at nrf_spi_event_check() during initialization. After tracking this down, I tried to see if this happened on the 832 DK, and it did not. Then, I ran on the 840 DK again, and the issue magically disappeared!

What is supposed to happen when I call nrf_spi_event_check(), and there is nothing else on the SPI bus to receive an RX byte from? What determines whether or not it hangs indefinitely?

I am using SDK 17.1.0. I've seen similar tickets, but I do not enable the app scheduler or the SoftDevice at the point in the code where I see the issue described above, so I wouldn't expect IRQ priority to matter.

Parents Reply Children
No Data
Related