0
\$\begingroup\$

I'm trying to flash eddystone beacon example of SDK version 12.3.0 to this board: enter image description here It should be a Radioland product and use a NRF51822 chip.

Using openocd on Raspberry Pi Zero with raspbian I can download original firmware and I can flash it again succesfully using this command:

openocd -f interface/raspberrypi2-native.cfg -c "transport select swd; set WORKAREASIZE 0" -f target/nrf51.cfg

When I try to flash eddystone demo it breaks on "reset run" (see below).

Open On-Chip Debugger
> flash banks
#0 : nrf51.flash (nrf51) at 0x00000000, size 0x00000000, buswidth 1, chipwidth 1
#1 : nrf51.uicr (nrf51) at 0x10001000, size 0x00000000, buswidth 1, chipwidth 1

> reset halt
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
> nrf51 mass_erase
nRF51822-QFAA(build code: H0) 256kB Flash
> program s130_nrf51_2.0.1_softdevice.bin
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
not enough working area available(requested 32)
no working area available, falling back to slow memory writes
** Programming Finished **
> reset
> program ble_app_eddystone_pca10028_s130.bin
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x000006d0 msp: 0x000007c0
** Programming Started **
not enough working area available(requested 32)
no working area available, falling back to slow memory writes
** Programming Finished **
> reset run
nrf51.cpu -- clearing lockup after double fault
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0xfffffffe msp: 0x20004d28
Polling target nrf51.cpu failed, trying to reexamine
nrf51.cpu: hardware has 4 breakpoints, 2 watchpoints

If I upload original firmware, it works correctly.

I'm doing something wrong?

What can I do to indentify the problem?

\$\endgroup\$
  • \$\begingroup\$ Probably you either don't have the softdevice, or not the right one or you lost the application while adding that. Or else the flash register that's supposed to point to the entry point of user code or a bootloader isn't right. It's been a few months since I worked on the nRF51's so at the moment can only say from memory that there is such a register, not what/where it is. \$\endgroup\$ – Chris Stratton Oct 7 '19 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.