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
  • OK this is possibly a clue...

    I went back to working on my non-BLE project. This was originally based on SDK\examples\peripheral\blinky\pca10056 -  the proj.emProject was derived from that and it uses that flash_placement.xml file. Running on our new PCB prototypes, not an eval board. This has been working fine, developed a bunch of non-BLE app code, all good.

    This morning I accidentally built and loaded my target with this code, but using the flash_placement.xml file from SDK\examples\ble_peripheral\ble_app_blinky (in other words it has the reserved flash and ram areas for a softdevice). No other changes, project not loading a softdevice. The J-Link loader died in exactly the same way, while loading target:-

    Preparing target for download
    Executing Reset script TargetInterface.resetAndStop()
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Downloading ‘ds1241.elf’ to J-Link
    Programming 14.7 KB of addresses 00000000 — 00003b03
    Programming 0.0 KB of addresses 00003b04 — 00003b07
    Target voltage too low (1 Volt is required, Measured: 0.0 Volt).
    Download failed

    I don't fully understand what is going on here, I'm a newbie to nRF stuff. I've read the basics about this here...

    https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory

    I'm guessing this means it put my application code in flash in the reserved area gfor the softdevice, so it wouldn't run? But why would that cause a "Target voltage too low" error, and cause the J-Link to disconnect?

    By the way I put a scope on the target 3V3 rail while loading this, and it is solid 3V3, doesn't dip. Similarly when I try loading the softdevice into an eval board.

    Any thoughts?

Reply
  • OK this is possibly a clue...

    I went back to working on my non-BLE project. This was originally based on SDK\examples\peripheral\blinky\pca10056 -  the proj.emProject was derived from that and it uses that flash_placement.xml file. Running on our new PCB prototypes, not an eval board. This has been working fine, developed a bunch of non-BLE app code, all good.

    This morning I accidentally built and loaded my target with this code, but using the flash_placement.xml file from SDK\examples\ble_peripheral\ble_app_blinky (in other words it has the reserved flash and ram areas for a softdevice). No other changes, project not loading a softdevice. The J-Link loader died in exactly the same way, while loading target:-

    Preparing target for download
    Executing Reset script TargetInterface.resetAndStop()
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Downloading ‘ds1241.elf’ to J-Link
    Programming 14.7 KB of addresses 00000000 — 00003b03
    Programming 0.0 KB of addresses 00003b04 — 00003b07
    Target voltage too low (1 Volt is required, Measured: 0.0 Volt).
    Download failed

    I don't fully understand what is going on here, I'm a newbie to nRF stuff. I've read the basics about this here...

    https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory

    I'm guessing this means it put my application code in flash in the reserved area gfor the softdevice, so it wouldn't run? But why would that cause a "Target voltage too low" error, and cause the J-Link to disconnect?

    By the way I put a scope on the target 3V3 rail while loading this, and it is solid 3V3, doesn't dip. Similarly when I try loading the softdevice into an eval board.

    Any thoughts?

Children
No Data
Related