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

bootloader stuck in wait_for_events if started programatically

Hi,

I have modified slightly the OTA bootloader sample in SDK6.1 and SoftDevice 7.1.0. After flashing the bootloader code to the nrf51822 it works like charm, I can update the firmware on the module OTA with MCP. If I upload OTA a modified version of hrs example code in SDK with OTA DFU support, the bootloader gets started by writing 0x01 to the DFU control characteristic, but afterwards it is stuck in wait_for_events function in bootloader.c. I use gcc 4.9.3 as compiler on Linux. Do you have any ideas what I should check?

I have checked with the unmodified codes in SDK v6.1. DFU does not work with MCP with those codes either. Is gcc problematic with bootloader?

Thanks,

Tamas

Parents
  • Hey,

    i have a similar problem with the S310 bootloader.

    1. I can flash softdevice S310 V2.0.1 and Bootloader from SDK 7.2.0 --> Start in Bootloader mode
    2. Flash a custom applciation with DFU support --> Application starts --> ok
    3. Writing 0x01 to the DFU control characteristic --> Bootloader starts --> ok
    4. Connect with MCP and starts Discovery Services --> Bootloader hangs up! --> Failure

    I don't know the problem. If i use sd_nvic_SystemReset() instead of jump to the Bootloader address all works as it should. The only difference I can see here is:

    • With sd_nvic_SystemReset() i always initialize sd_mbr_command(&com);
    • Jump to the Bootloader address --> sd_mbr_command(&com); is not executed before enable the softdevice

    Do you already have new knowledge?

Reply
  • Hey,

    i have a similar problem with the S310 bootloader.

    1. I can flash softdevice S310 V2.0.1 and Bootloader from SDK 7.2.0 --> Start in Bootloader mode
    2. Flash a custom applciation with DFU support --> Application starts --> ok
    3. Writing 0x01 to the DFU control characteristic --> Bootloader starts --> ok
    4. Connect with MCP and starts Discovery Services --> Bootloader hangs up! --> Failure

    I don't know the problem. If i use sd_nvic_SystemReset() instead of jump to the Bootloader address all works as it should. The only difference I can see here is:

    • With sd_nvic_SystemReset() i always initialize sd_mbr_command(&com);
    • Jump to the Bootloader address --> sd_mbr_command(&com); is not executed before enable the softdevice

    Do you already have new knowledge?

Children
No Data
Related