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

Halt and Catch Fire (code killing nRF52840)

I appear to have some very simple code that when loaded into a nRF52840 kills it, such that I cannot recover it, possibly hardware failure. I would appreciate any suggestions!

I am using a Panasonic PAN1780 KIT evaluation board (similar to nRF52840DK, with onboard J-Link). SDK 17.0.2, SES Release 5.30a Nordic Ed

Summary - I have taken the SDK\examples\ble_peripheral\ble_app_blinky\ code, made a minor change, and when I load it into target, the jlink loader locks up and from that point on the evaluation board will no longer load or run the softdev. It appears to be toast. I tried a second eval board and that did exactly the same, so not just random failure.

Here's a summary of how I developed the code that killed it:-
- I took a copy of the BLE peripheral blinky example SDK\examples\ble_peripheral\ble_app_blinky\pca10056\s140\ses\ and copied to a new project folder
- modified paths in project file (with absolute paths to all SDK files as project folder is elswhere)
- turned on nRF_Log stuff in sdk_config.h to use RTT and debug terminal in SES
at this point the code would still load and run fine.

- I then copied ble_lbs.c/h to project folder and removed references to library versions (this was so I could later modify them)

At this point I get the killer code, builds fine, but jlink locked up while loading it, and the eval board is then toast!

I have tried again with a second eval board, and started afresh with a new copy of the blinky code, in case I did a bad edit first time round. Exactly the same. As soon as I switched to using local copy of ble_lbs.c/h it killed the eval board.

What is weird is I can erase the eval board, and load a non-ble app such as SDK\examples\peripheral\blinky, and that still runs fine. But if I try and load any ble code (even the vanilla SDK ble_app_blinky) it fails while loading the softdevice.

The J-Link log says:-
Downloading ‘s140_nrf52_7.2.0_softdevice.hex’ to J-Link
Programming 2.7 KB of addresses 00000000 — 00000aff
Programming 149.5 KB of addresses 00001000 — 00026633
Target voltage too low (1 Volt is required, Measured: 0.0 Volt).
Download failed

Note that when it fails, the USB connection to the eval board j-link is lost, i.e. it seems to be taking out the j-link part of the eval board, not just the target.

I have tried a full erase of both eval boards, same.

I have tried power cycling target (many times)

I have tried rebooting my PC

I have tried the nRF Command Line Tools nrfjprog.exe --recover (full chip erase etc)

Basically, once the eval board gets in this state, as soon as I try to load the softdevice the whole eval board goes down. Both boards the same. And it seems permanent. I'm wondering if it is a config problem, maybe something is misconfiguring the target power management so it powers down during programming. But surely a full erase should sort that. It feels like hardware damage, i.e. the code has somehow killed the target hardware.

I have some more eval boards on order, but I'm obviously reluctant to try those until I have worked out what is going wrong. This seems really weird - I have not changed a single line of code from the original blinky code, just moved files around and tweaked the project to suit.

If it helps, you can download my "killer" project from here https://www.dropbox.com/s/eghovqr9fnoavf7/snapB1_testblinkyperiph-killer.zip

Any help would be much appreciated, we're right up against project deadlines and I did not expect such a basic show-stopper

Thanks, Ben

Parents
  • A brief update - I think I've solved my problem

    Early days, I want to do lots of testing, but seems to be related to my PC or USB ports. Tried programming target from my laptop and it is now working fine... doh!

    Very very strange, as it seemed to be entirely reproducible and seemed to be a result of a very specific sequence of project updates. And of course some misleading error messages about target voltage...

    I'll post more here once I've done more testing, just wanted to let you know ASAP so I'm not wasting peoples time

Reply
  • A brief update - I think I've solved my problem

    Early days, I want to do lots of testing, but seems to be related to my PC or USB ports. Tried programming target from my laptop and it is now working fine... doh!

    Very very strange, as it seemed to be entirely reproducible and seemed to be a result of a very specific sequence of project updates. And of course some misleading error messages about target voltage...

    I'll post more here once I've done more testing, just wanted to let you know ASAP so I'm not wasting peoples time

Children
Related