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

nRF52 dfu uart

Im having problems running DFU serial examples.

i use one of the examples of the SDK but it seems like board doesnt leave the bootloader mode and memory value doesnt change. im using the dfu_test_softdevice_b.zip package to upload.

im using Linux OS

  • Unfortunately, the bootlaoder doesn't appear to work when built with GCC in this alpha release. Please try with the attached bootloader that I built with ARMCC and see if you get the same result.

    I was able to make it work with the Keil compiled version. Here are the command line arguments I used:

    vidar@ubuntu:~/nrfutil/pc-nrfutil/nordicsemi$ sudo python __main__.py dfu serial -p       
    /dev/ttyACM0 
    -pkg /home/vidar/SDK/nRF5_SDK_11.0.0-
    2.alpha_bc3f6a0/examples/dfu/hci_dfu_send_hex/test_images_dual_bank_update_nrf52/dfu_test_app_hrm_s132.zip
    

    Bootloader : nrf52832_xxaa.hex

  • I'm having the same issue both with the hex file you provided and the gcc build from NRF5_SDK 11.

    I'm on OSX using nrfutil v0.3.0

    $ nrfutil version
    nrfutil version 0.3.0
    
  • $ nrfjprog --family nrf52 --program ~/Downloads/nrf52832_xxaa.hex --chiperase
    Parsing hex file.
    Erasing code and UICR flash areas.
    Applying system reset.
    Checking that the area to write is not protected.
    Programing device.
    
    $ nrfjprog --family nrf52 --reset
    Applying system reset.
    Run.
    
    $ nrfutil dfu serial -p /dev/tty.usbmodem14121 -pkg ~/Downloads/nrf5_sdk/examples/dfu/hci_dfu_send_hex/test_images_dual_bank_update_nrf52/dfu_test_app_hrm_s132.zip
    Upgrading target on /dev/tty.usbmodem14121 with DFU package /Users/justin/Downloads/nrf5_sdk/examples/dfu/hci_dfu_send_hex/test_images_dual_bank_update_nrf52/dfu_test_app_hrm_s132.zip. Flow control is disabled.
      [------------------------------------]    0%Timed out waiting for acknowledgement from device.
    
    
    Failed to upgrade target. Error is: No data received on serial port. Not able to proceed.
    
    Possible causes:
    - bootloader, SoftDevice or application on target does not match the requirements in the DFU package.
    - baud rate or flow control is not the same as in the target bootloader.
    - target is not in DFU mode. If using the SDK examples, press Button 4 and RESET and release both to enter DFU mode.
    
  • Try to replace the '--chiperase' option with '--sectorerase'. Otherwise the softdevice will be erased from the device. You need both softdevice and bootloader for DFU to work.

  • I tried again still no luck:

    $ nrfjprog --family nrf52 --program s132_nrf52_2.0.0-7.alpha_softdevice.hex --chiperase
    $ nrfjprog --family nrf52 --program ~/Downloads/nrf52832_xxaa.hex --sectorerase
    $ nrfjprog --family nrf52 --reset
    $ nrfutil dfu serial -p /dev/tty.usbmodem14121 -pkg ~/Downloads/nRF5_SDK_11.0.0-2.alpha_bc3f6a0/examples/dfu/hci_dfu_send_hex/test_images_dual_bank_update_nrf52/dfu_test_app_hrm_s132.zip
    
Related