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
  • Hi Makouda,

    We don't reset all the register we configured in the bootloader before we jump to the application. So make sure you fully configured all the peripheral that you use. Would the SPI pin you use be the same as the pin we used to enter bootloader mode ? (P0.20)

    When debugging have you turned off optimization ?

    Can you reproduce the issue on a strip down firmware so we can also test here ?

Reply
  • Hi Makouda,

    We don't reset all the register we configured in the bootloader before we jump to the application. So make sure you fully configured all the peripheral that you use. Would the SPI pin you use be the same as the pin we used to enter bootloader mode ? (P0.20)

    When debugging have you turned off optimization ?

    Can you reproduce the issue on a strip down firmware so we can also test here ?

Children
No Data
Related