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

    MCP v3.7 should work with DFU from SDK v6.1. Could you try and test with stock example (ble_app_hrs_dfu) in SDK v6.1 and let me know the result ?

    Note that the ble_app_hrs_dfu won't do a chip reset, but jump directly from the application code to the bootloader when writing 1 to DFU control characteristic. So in the bootloader you should not reinitialize the softdevice when triggered from application.

    Attached file: ble_app_hrs - TestDFU.zip ble_app_hrs_dfu.hex

  • Hi,

    Sorry, but I cannot do a sniffer trace as I have only one development dongle (PCA10000) and I could not upload firmware OTA nor with an IPhone (IPhone 5 w/ IOS8) neither with an Android phone (Samsung Galaxy S3 w/ Android 4.3) even when uploading with Master Control Panel and dev dongle was possible.

    I have attached the Master Control Panel log instead, maybe it helps. Log file

    The log file contains a service discovery when the nordic_hrm example has already been uploaded OTA to the device. After this I have pressed the DFU button, and I tried to upload a hex file. The DFU procedure failed. After the failed DFU procedure I have pressed the Service Discovery button again. During this service discovery the bootloader has hung as seen in the logs.

    I try to reproduce the issue with the Android Master Control Panel and do sniffing too.

    Tamas

Reply
  • Hi,

    Sorry, but I cannot do a sniffer trace as I have only one development dongle (PCA10000) and I could not upload firmware OTA nor with an IPhone (IPhone 5 w/ IOS8) neither with an Android phone (Samsung Galaxy S3 w/ Android 4.3) even when uploading with Master Control Panel and dev dongle was possible.

    I have attached the Master Control Panel log instead, maybe it helps. Log file

    The log file contains a service discovery when the nordic_hrm example has already been uploaded OTA to the device. After this I have pressed the DFU button, and I tried to upload a hex file. The DFU procedure failed. After the failed DFU procedure I have pressed the Service Discovery button again. During this service discovery the bootloader has hung as seen in the logs.

    I try to reproduce the issue with the Android Master Control Panel and do sniffing too.

    Tamas

Children
No Data
Related