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

nrf52 spi not working when bootloader flashed

I'm tying to read and write external memory using Spi bus

when I flash only the softdevice and the app, the program works fine

but when I flash the bootloader, the program hang (does't get out of the loop below).

it's really a matter of bootloader flashing, I always replicate the behavior :

  • without bootloader it's working (not blocking at while (read_status_register(&spi) & 0x01) {}; )

  • with bootloader it's blocking

I have no issue with SPI configurations, it works well without bootloader

with the bootloader I flashed, the DFU works fine anyway

How does the running sequence work when bootloader present?

Can the bootloader configure some IO even when the app is running

the program freeze exaclty when calling nrf_drv_spi_transfer . the PINS used for SPI are P19, P20 P21 P22. once nrf_drv_spi_transfer is called the device is no longer detected. I had to call nrfjprog --recover to reflash it again

Parents
  • @makouda: It may not be the issue with the pin then. Could you explain why you only used 24kB in the configuration of your RAM in the application ? (5F80) Which chip version are you testing with ?

    Is it possible to reproduce the issue with our example in the SDK ? Or can you provide a stripped down version of the firmware so we can test here ?

    Have you tried to access the SPI peripheral directly instead of using our driver ?

Reply
  • @makouda: It may not be the issue with the pin then. Could you explain why you only used 24kB in the configuration of your RAM in the application ? (5F80) Which chip version are you testing with ?

    Is it possible to reproduce the issue with our example in the SDK ? Or can you provide a stripped down version of the firmware so we can test here ?

    Have you tried to access the SPI peripheral directly instead of using our driver ?

Children
No Data
Related