spi_transceive blocks indefinitely at spi_context_wait_for_completion

I've created a new sandbox project for a nRF9160DK that requires a SPI Master for testing a Flash part. Since I already have "working" SPIM code in a different Segger project, I just copied that code to the new project. Unfortunately, when I run the new project, it just hangs at the spi_context_wait_for_completion() call at line 241 in the spi_nrfx_spim.c source file (see attached screenshot). I copied over the same C-source file, prj.conf file and nrf9160dk_nrf9160_ns.overlay file that I use in my other project. And that project is working perfectly. So I'm surprised that one project works and the other doesn't with almost identical code. I have read several topics of developers reporting the same blocking condition, but I'm not seeing any solutions. 

I have attached the prj.conf and overlay file and a screenshot. Please let me know what else I can check. I'm sure it must be a config issue as my SPIM code is identical in both projects.

7215.prj.conf8875.nrf9160dk_nrf9160_ns.overlay

Parents
  • From a source code standpoint, there is no difference between the 2 projects. And while I agree it doesn't make sense, it is happening. Out of desperation, I went back to a SPI ticket you and I worked on a couple of months ago. I downloaded that code. Copied it into a blinky example using SDK v1.9.1 and ended up with the same result, spi_transceive just hangs. I have attached my sample code and a screenshot from my LA. Line 0 is CS, Line 1 is SCLK, 2 and 3 are MOSI and MISO. The LA trace looks very strange, the clock is really irregular, there is no activity on MOSI/MISO and the delays to assert/deassert CS are so long my cheap scope won't capture it. 

    BTW, I am using Windows 11 for this development. Have you heard of any issues with J-Link and Windows 11? 

    As always I appreciate your help and insight.22600.sample.zip

Reply
  • From a source code standpoint, there is no difference between the 2 projects. And while I agree it doesn't make sense, it is happening. Out of desperation, I went back to a SPI ticket you and I worked on a couple of months ago. I downloaded that code. Copied it into a blinky example using SDK v1.9.1 and ended up with the same result, spi_transceive just hangs. I have attached my sample code and a screenshot from my LA. Line 0 is CS, Line 1 is SCLK, 2 and 3 are MOSI and MISO. The LA trace looks very strange, the clock is really irregular, there is no activity on MOSI/MISO and the delays to assert/deassert CS are so long my cheap scope won't capture it. 

    BTW, I am using Windows 11 for this development. Have you heard of any issues with J-Link and Windows 11? 

    As always I appreciate your help and insight.22600.sample.zip

Children
No Data
Related