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

nRF52 DFU working on dev kit, not on custom board

I've been having a very difficult time debugging this issue. I've modified the bootloader_secure example and have it working on the dev kit using the 330 Softdevice. It works great, and I'm able to update and run my own firmware images using the nRF Connect android app.

The issue is when moving to my own custom board. I know my custom device works fine with BlueTooth, since I've been working on a separate app that functions exactly the same as the dev kit - BlueTooth and all.

The problem is trying to run the bootloader code on the custom board - it sometimes takes several attempts to connect over BlueTooth using the android app, and then DFU hangs after about 6% completion if it even gets that far. There's no error message over RTT - just a hang and a GATT CONN TIMEOUT error on the android log, as if there was a hard fault somewhere in the CPU. The one difference I should highlight between my device and the dev kit is that my board does not utilize an external low frequency crystal, so I modified the code to use the RC oscillator - again, this code works fine on the dev kit.

I suspect there may be some CPU thrashing going on or some clock instability maybe, as sometimes I can't even get the RTT console logs to display, suggesting a pretty low level issue. Here's what I've tried:

  • Adjusting MIN_CONN_INTERVAL and MAX_CONN_INTERVAL

  • Using NRF_CLOCK_LF_SRC_SYNTH instead of NRF_CLOCK_LF_SRC_RC

  • Reducing the number of packets sent by nRF Connect from 10 to 5 and 1

  • Adjusting HCI_RX_BUF_QUEUE_SIZE from 4 to 16

What's strange is the identical code - s330 softdevice and all - runs fine on the dev board. I can step through the code using Eclipse just fine, but I'd be grateful for some suggestions as to how to debug this more effectively.

Parents
  • OK I tried DFU on another of my custom boards that I assembled today and it worked fine - I think this was an issue with the board itself, maybe a solder bridge or something that caused this problem. Thanks again for your help.

    That being said, I still think there is something strange going on with the above - the bootloader_secure app might not be able to run on the NRF_CLOCK_LF_SRC_SYNTH setting...it might be worth tracking down this particular issue.

Reply
  • OK I tried DFU on another of my custom boards that I assembled today and it worked fine - I think this was an issue with the board itself, maybe a solder bridge or something that caused this problem. Thanks again for your help.

    That being said, I still think there is something strange going on with the above - the bootloader_secure app might not be able to run on the NRF_CLOCK_LF_SRC_SYNTH setting...it might be worth tracking down this particular issue.

Children
No Data
Related