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

Issue with serial DFU on NRF52

Hi All,

I am trying to get the serial DFU working with nRF52832 development kit with SDK 13. I am able to get the bootloader flashed and have installed the nrfUtil tool. I followed the exact sequence of the steps mentioned here and got it right until the final step where I am trying to sent the application image to the device. The image transfer doesn't progress from 0% and it finally fails with the below logs: image description

I did some debugging and found that in the "on_packet_received" function, the device is getting an invalid opcode and so its responding with an error. I also tried disabling the HFC in device and the nrfutil tool as mentioned in this thread with no success. Finally I also tried changing the UART Tx/Rx pins to to P[0].3 and P[0].4 with no improvements.

Please let me know if you have some pointers which would help me in debugging this.

  • Hi Siva,

    If you have a look at the documentation (very first lines), you can find that the serial bootloader still require the softdevice.

    The reason is that the bootloader still use the vector forwarding inside the softdevice and the flash API is also used the softdevice flash API.

    The softdevice always have to be flashed first.

    Erase function inside Keil is not suggested to use, the reason is that it can't erase the softdevice. You should always use nRFGo studio or nRFjprog to do flash erase.

  • Hi Hung,

    Thanks for your inputs.

    I am stuck with an other issue now. I need to do a hard reset (unplug-plug the USB to serial cable in the nef52 DK) before able to perform a serial DFU. This is an intermittent issue when the softreset using SW5 isn't enough after programming the bootloader and you need to perform a hard reset to get the DFU transfer going.

    I connected a saleae to trace the transfer and could see that a nrfutil is it sending a "\t 1 192" in ascii for which there is no response from the device.

    The LED1 and LED3 is the one normally lit in the bootloader mode but in the instances when the device doesn't respond the LED1 changes LED2 and I can see LED2 and LED3 glowing.

    The steps that I followed is as below:

    1. Flash the SD and the bootloader after a flash erase from nrfGO.
    2. Reset the device using SW5 and transfer the image using nrfUtil
    3. Transfer fails with msg "No ping response" (Not always)
    4. Unplug and plug the cable. Try the DFU now and it works.

    The same happens when I switch back to the bootloader from the application for performing a DFU. The device jumps to the bootloader but the transfer fails with "No ping response"

    Please let me know if you have some pointers for resolving this issue.

  • Hi Siva,

    It's pretty strange. I just tested on my nRF52DK , I can reset the board right after programming.

    Could you make it more clear what you mean LED1 changes and LED 2 LED3 glowing? What exactly was glowing, like lid up bot not solid ?

    Do you see that right after you program the bootloader or when you start sending the image ?

    Could you include your bootloader file and the .zip file you used ?

Related