Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Issues with OTA DFU on nRF52 DK and Custom Board

Rank

Total Posts: 2

Joined 2016-12-06

PM

Hello, I'm attempting to perform an OTA DFU of my custom nRF52832 board and I'm encountering issues. I am able to get into the DFU mode of my bootloader and connect to my custom device with the OTAUpdater.exe program your company has created. However, when I attempt to upload a new application code it hangs at Upload 0% and eventually times out. Using the same project, I am able to perform an OTA DFU on the nRF52DK.

I've analyzed the packets from the Device0.txt log, and I'm finding that on the DK I get the following packets:

2091.194 { 178742638} Tx - [A4][09][50][A0][00][00][00][00][00][00][00][00][5D][00][00]
2091.194 { 178742638} Rx - [A4][03][40][00][01][0A][EC]
2091.194 { 178742638} Rx - [A4][03][40][00][01][05][E3]
2091.303 { 178742747} Rx - [A4][09][4E][00][43][34][02][00][01][00][00][00][97]
2091.443 { 178742887} Rx - [A4][09][4E][00][43][34][03][00][01][00][00][00][96]

That last packet repeats 7 times on the DK, and then I receive 4 new packets at the end. Then it initiates the update.

On my custom board it just repeats the:

[A4][09][4E][00][43][34][03][00][01][00][00][00][96]

until it times out, and retries the initial exchange:

2092.317 { 178743761} Tx - [A4][02][4D][00][52][B9][00][00]
2092.317 { 178743761} Rx - [A4][02][52][00][03][F7]

2091.131 { 178742575} Tx - [A4][09][50][00][44][0A][01][FB][64][20][00][00][0D][00][00]
2091.178 { 178742622} Rx - [A4][09][4E][00][43][34][02][00][01][00][00][00][97]

etc. and the update never occurs.

Whatever is happening in the first packet exchange I mentioned is preventing the update process to continue. Clearly the OTAUpdater.exe program is receiving the packets, but the packets aren’t changing from the device side. There doesn’t appear to be an acknowledgement that is triggering the changing of the packet, so there must be something happening on the code side. Do you have any insight as to what these packets correspond with or what I should do to fix it?      
Avatar
Rank

Total Posts: 2

Joined 2014-05-06

PM

Hi DGraham,

I am an engineer with ANT Wireless that works primarily on firmware upgrades and bootloaders.

I would like to do a little more information gathering around your problem. My colleague notified me that you have a thread here: https://devzone.nordicsemi.com/question/168016/nrf52-ant-dfu-hangs-at-wait_for_events/ with some information

I would tend to agree with Petter that this looks like it is related to a difference in hardware or configuration between the DK and your custom board. Could you please send or diff the sdk_config.h files between the application and bootloader?

Common Issues:
- No external LF crystal
- Building bootloader with wrong/mismatched softdevice headers to the softdevice .hex actually on the device
- No ANTFS network key set

I just tried building the bootloader and running an update with the DK board and everything works good on my end. I am testing with no application for now, only the bootloader and softdevice, and updating with the same bootloader .hex image.

Can you try debugging the bootloader and placing a breakpoint in upload_data_response_fail_reset (dfu_transport_ant.c). If it hits that breakpoint, can you show me what the call stack looks like? You may have to turn optimization off in the project settings.

If it never gets to this point, I would be leaning more towards an issue with the crystal or softdevice configuration.

Thanks,

Matt       [ Edited: 27 September 2017 12:15 PM by msembinelli ]
Rank

Total Posts: 2

Joined 2016-12-06

PM

Hi Matt, I appreciate the response. I've attached the sdk_config.h files for the bootloader and the application.

I definitely have an external crystal. It's an Abracon ABS07-32.768KHZ-T, which is +/- 20ppm. I've also set an ANT-FS network key.

I'm going to go ahead and try setting up that breakpoint now and I'll edit with the results.      

File Attachments

Avatar
Rank

Total Posts: 2

Joined 2014-05-06

PM

DGraham - 27 September 2017 12:27 PM
Hi Matt, I appreciate the response. I've attached the sdk_config.h files for the bootloader and the application.

I definitely have an external crystal. It's an Abracon ABS07-32.768KHZ-T, which is +/- 20ppm. I've also set an ANT-FS network key.

I'm going to go ahead and try setting up that breakpoint now and I'll edit with the results.


No problem! Thanks for the info.

Unfortunately I think there is something wrong with the forums and I can't view your attachments (I will let my colleagues in charge of the forums know).

I will PM my email to you so you can send me the files that way. Check your inbox.