This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Issues with DFU for SD v7

Hey!

I'm testing out the new SoftDevice and am trying to update firmware OTA but thus far have not been able to do so. I've tried from the Master Control Panel android app (v 2.0.2). I can discover and connect to DfuTarg no problem but when I try to actually update the firmware it gets to 0%, hangs there for maybe 5 seconds, and then disconnects. I also tried from the PC version of Master Control Panel (v3.7.0) and the same thing happened. It connected, discovered, started DFU, and hung at zero.

The SoftDevice is version 7.0.0 flashed from nRFgo Studio (v 1.17.0.3211), the bootloader is the version from SDK v6.1.0, and the firmware I'm trying to upload is the heart rate sensor app from the same SDK. This app works fine when flashed via nRFgo Studio.

I'm using a custom board and so have modified SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, true) in ble_stack_init() to be SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, false).

Thanks for your help ^^

  • Make sure that when you change the clock source SOFTDEVICE_HANDLER_INIT() that 'use scheduler' is still 'true'. I think part of my problem was that I copypasted a line over from the heart rate sensor which changed that.

  • Hi Anne,

    Thanks for your reply. I am using the ble_app_hrs_dfu project and I haven't modified any line after installing the SDK. The 'USE_SCHEDULER' is set to false as follows:

    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, false);

    I think this is correct because the project is not using the scheduler to organise the events. I cannot see the scheduler initialise in any part of the code.

  • I'm not sure why you don't see it as advertising as a DFUTarg after you followed the steps and push back as stated in step 6. I would do a quick test with the bootloader example in the SDK just to make sure you are doing the app/MCP correct. Compile and flash the example from the SDK here(placed in my tree structure): C:\Nordic Semiconductor\nRF51 SDK\nrf51_sdk_v6_1_0_b2ec2e6\nrf51822\Board\nrf6310\device_firmware_updates\bootloader

    Erase the chip, program softdevice and this example and you should by default see the DFUTarg advertising. Make sure you can upload a new FW from this first of all.

  • Hi Asbjørn

    Thank you for your quick reply. I have the following error trying to flash the bootloader hex

    Program Size: Code=14180 RO-data=328 RW-data=256 ZI-data=5988
    FromELF: creating hex file... "._build\bootloader.axf" - 0 Error(s), 0 Warning(s). *** Completed Cross-Module-Optimization after 3 iteration(s). "nrfjprog.exe" --reset --program "C:\Keil_v5\ARM\Device\Nordic\nrf51822\Board\nrf6310\device_firmware_updates\bootloader\arm_build\bootloader.HEX" Parsing hex file(s). ERROR: Hex file(s) contain addresses outside the code, RAM and UICR areas.

    I am using a 128kb version of the chip

  • @Ignacio. Ahhh, right. I was being unclear: the bootloader uses the scheduler but the heart rate app doesn't. I messed this up, I told the bootloader not to use the scheduler, and that's why my code didn't run.

    Also, have you made sure that the Bootloader/DFU start address is set properly? Scroll down to the bottom of the Keil project page in the SDK, there's a screenshot of what the Keil configuration window for location should look like.

    BTW, the SDK says the 128 kB version doesn't support DFU of the SoftDevice or Bootloader. You should still be able to update your application, though.

Related