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

Bootloader doesn't load application on power-on

I have a small problem with my bootloader + application on NRF52832. I'm using SDK 12.2.0 with S132 v3.0.0.

When the device loses power, and power is then re-applied, the bootloader doesn't start the application. If I however issue a reset through SWD, the application is started.

Everything else is working as expected (BLE DFU firmware update etc.). I know there isn't a lot to go on, but I'm hoping there is a simple explanation.

Parents
  • Well, I think I finally found the culprit.

    I use hardware debouncing for the buttons on my board (couple of resistors and a capacitor). During initial power up of the board, the capacitor might not be fully charged by the time nrf_dfu_enter_check is called, leading the application to read a low level on the bootloader button pin, and thus staying in bootloader mode.

    On my board a 100nF capacitor is initially charged through 200 kOhms, so a 20ms delay (100*10^(-9) * 200*10^3) at the top of main in my bootloader code is sufficient to make this problem go away.

    Debouncing circuit

Reply
  • Well, I think I finally found the culprit.

    I use hardware debouncing for the buttons on my board (couple of resistors and a capacitor). During initial power up of the board, the capacitor might not be fully charged by the time nrf_dfu_enter_check is called, leading the application to read a low level on the bootloader button pin, and thus staying in bootloader mode.

    On my board a 100nF capacitor is initially charged through 200 kOhms, so a 20ms delay (100*10^(-9) * 200*10^3) at the top of main in my bootloader code is sufficient to make this problem go away.

    Debouncing circuit

Children
No Data
Related