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

OpenOCD nRF52810: Can't erase or flash - Unknown device HWID 0x00000142

I've got myself one an E73-2G4M04S1A board containing an nRF52810 chip for evaluation.

I've setup an Raspberry Pi 1 rev2.0 with OpenOCD using this guide and wired it up according to this guide.

I was able to unlock the chip using these instructions.


My Problem: If I try to erase the chip using

nrf52 mass_erase

(which I'm instructed to do by the first guide before flashing the Adafruit bootloader)
I get:

Warn : Unknown device (HWID 0x00000142)
Error: Failed to erase reg: 0x4001e50c val: 0x00000001
Error: Failed to erase the chip

When I try to flash it without erasing first I get:

** Programming Started **
auto erase enabled
Warn : Unknown device (HWID 0x00000142)
Info : Padding image section 0 with 1692 bytes
Warn : using fast async flash loader. This is currently supported
Warn : only with ST-Link and CMSIS-DAP. If you have issues, add
Warn : "set WORKAREASIZE 0" before sourcing nrf52.cfg to disable it
Warn : no flash bank found for address 74000
Warn : Adding extra erase range, 00000000 to 0x00000013
Warn : using fast async flash loader. This is currently supported
Warn : only with ST-Link and CMSIS-DAP. If you have issues, add
Warn : "set WORKAREASIZE 0" before sourcing nrf52.cfg to disable it
wrote 114924 bytes from file feather52_bootloader_v050_s132_v201.hex in 4.186530s (26.808 KiB/s)
** Programming Finished **
** Verify Started **
Error: nrf52.cpu -- clearing lockup after double fault
Error: error executing cortex_m crc algorithm
Error: checksum mismatch - attempting binary compare
diff 0 address 0x00074000. Was 0x00 instead of 0x80
diff 1 address 0x00074001. Was 0x00 instead of 0x7f
...
diff 126 address 0x000740c4. Was 0x00 instead of 0xa7
diff 127 address 0x000740c5. Was 0x00 instead of 0x94
More than 128 errors, the rest are not printed.
embedded:startup.tcl:476: Error: ** Verify Failed **
in procedure 'script'
at file "embedded:startup.tcl", line 60
in procedure 'program' called at file "openocd.cfg", line 19
in procedure 'program_error' called at file "embedded:startup.tcl", line 520
at file "embedded:startup.tcl", line 476

Using the "set WORKAREASIZE 0" mentioned in the warning above gives this instead:

target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000008e4 msp: 0x20000400
** Programming Started **
auto erase enabled
Warn : Unknown device (HWID 0x00000142)
Info : Padding image section 0 with 1692 bytes
Warn : not enough working area available(requested 32)
Warn : no working area available, falling back to slow memory writes
Warn : no flash bank found for address 74000
Warn : Adding extra erase range, 00000000 to 0x00000013
Warn : not enough working area available(requested 12)
Running slow fallback erase check - add working memory
Error: The chip was not pre-programmed with SoftDevice stack and UICR cannot be erased separately. Please issue mass erase before trying to write to this region
Error: failed erasing sectors 0 to 0
embedded:startup.tcl:476: Error: ** Programming Failed **
in procedure 'script'
at file "embedded:startup.tcl", line 60
in procedure 'program' called at file "openocd.cfg", line 20
in procedure 'program_error' called at file "embedded:startup.tcl", line 532
at file "embedded:startup.tcl", line 476

"set WORKAREASIZE 0" followed by "nrf52 mass_erase 0" gives the same output as without "set WORKAREASIZE 0" (see the top of the post)



Does anybody have any ideas / insights for me? Thank you!

Parents Reply Children
No Data
Related