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 the plot thickens... I'm not sure what is happening here, wondering if the J-Link OB is the cause of the problem.

    I've been experimenting with the nRF Connect Progammer (latest v1.4.8), connected via the eval board J-Link OB to our new target hardware (i.e. not the target on the eval board). I can load our non-BLE application to the target absolutley fine, and it runs. However if I erase the target then try loading the softdevice hex file, then the load fails. This is JUST the softdevice, no application code at all:-

    nRF5_SDK_17.0.2_d674dde\components\softdevice\s140\hex\s140_nrf52_7.2.0_softdevice.hex

    Here's the log file from nRF Connect Programmer:-

    https://www.dropbox.com/s/1mqmo7vdmf7ac69/2021-03-01T10_38_38.221Z-log.txt

    10:40 tried loading Z:\prefect\ds1241-sensus-pcu\sw\snap12\Output\Debug\Exe\ds1241.hex - loads fine and runs
    10:41 tried loading ONLY softdevice, fails (errors start at T10:42:01.01)

    No mention in the log of any target voltage problems, but it does give lots of JLINK_HasError() messages.

    The Panasonic PAN1780 eval boards have J-Link OB-SAM3U128 V3 compiled Jul  3 2020 10:46:22

    I have two eval boards here, both do the same so I'd be surprised if it is a hardware problem. I have more arriving today. Or I could buy a normal jlink, just to check it isn't the OB ones.

    Any ideas would be very welcome here, I'm up against deadlines...

Reply
  • OK the plot thickens... I'm not sure what is happening here, wondering if the J-Link OB is the cause of the problem.

    I've been experimenting with the nRF Connect Progammer (latest v1.4.8), connected via the eval board J-Link OB to our new target hardware (i.e. not the target on the eval board). I can load our non-BLE application to the target absolutley fine, and it runs. However if I erase the target then try loading the softdevice hex file, then the load fails. This is JUST the softdevice, no application code at all:-

    nRF5_SDK_17.0.2_d674dde\components\softdevice\s140\hex\s140_nrf52_7.2.0_softdevice.hex

    Here's the log file from nRF Connect Programmer:-

    https://www.dropbox.com/s/1mqmo7vdmf7ac69/2021-03-01T10_38_38.221Z-log.txt

    10:40 tried loading Z:\prefect\ds1241-sensus-pcu\sw\snap12\Output\Debug\Exe\ds1241.hex - loads fine and runs
    10:41 tried loading ONLY softdevice, fails (errors start at T10:42:01.01)

    No mention in the log of any target voltage problems, but it does give lots of JLINK_HasError() messages.

    The Panasonic PAN1780 eval boards have J-Link OB-SAM3U128 V3 compiled Jul  3 2020 10:46:22

    I have two eval boards here, both do the same so I'd be surprised if it is a hardware problem. I have more arriving today. Or I could buy a normal jlink, just to check it isn't the OB ones.

    Any ideas would be very welcome here, I'm up against deadlines...

Children
No Data
Related