Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with flashing #3

Closed
thbiela opened this issue Nov 13, 2021 · 8 comments
Closed

Help with flashing #3

thbiela opened this issue Nov 13, 2021 · 8 comments

Comments

@thbiela
Copy link

thbiela commented Nov 13, 2021

I have now bought two NRF52832 ibeacons. I am trying to flash them using a STLinkV2.

I used the tagged v.0.3 branch. I have downloaded the build files and the nRF5 SDK.

My openocd directory looks like this:

image

Then I use the following commands to flash the data:

.\openocd.exe -d2 -f openocd.cfg -c 'init_reset halt; init; halt; nrf5 mass_erase; reset; exit'
.\openocd.exe -d2 -f openocd.cfg -c 'init_reset halt; init; halt; program s132_nrf52_7.2.0_softdevice.hex verify; reset; exit'
.\openocd.exe -d2 -f openocd.cfg -c 'init_reset halt; init; halt; program nrf52832_xxaa.hex verify; reset; exit'

This is the output:

 .\openocd.exe -d2 -f openocd.cfg -c 'init_reset halt; init; halt; nrf5 mass_erase; reset; exit'
xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2021-10-16-21:19)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
debug_level: 2

WARNING: interface/stlink-v2.cfg is deprecated, please switch to interface/stlink.cfg
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD

nRF52 device has a CTRL-AP dedicated to recover the device from AP lock.
A high level adapter (like a ST-Link) you are currently using cannot access
the CTRL-AP so 'nrf52_recover' command will not work.
Do not enable UICR APPROTECT.

Info : clock speed 1000 kHz
Info : STLINK V2J37S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.146009
Info : nrf52.cpu: Cortex-M4 r0p1 processor detected
Info : nrf52.cpu: target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for nrf52.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Handler SVCall
xPSR: 0x6100000b pc: 0x00025278 msp: 0x2000fef0
Info : nRF52832-QFAA(build code: E1) 512kB Flash, 64kB RAM
Info : Mass erase completed.
 .\openocd.exe -d2 -f openocd.cfg -c 'init_reset halt; init; halt; program s132_nrf52_7.2.0_softdevice.hex verify; reset; exit'
[...]
Info : clock speed 1000 kHz
Info : STLINK V2J37S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.161583
Info : nrf52.cpu: Cortex-M4 r0p1 processor detected
Info : nrf52.cpu: target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for nrf52.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x01000003 pc: 0xfffffffe msp: 0xffffffd8
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
Info : nRF52832-QFAA(build code: E1) 512kB Flash, 64kB RAM
Info : Padding image section 0 at 0x00000b00 with 1280 bytes
Warn : Adding extra erase range, 0x0002596c .. 0x00025fff
** Programming Finished **
** Verify Started **
** Verified OK **
.\openocd.exe -d2 -f openocd.cfg -c 'init_reset halt; init; halt; program nrf52832_xxaa.hex verify; reset; exit'
[...]
Info : clock speed 1000 kHz
Info : STLINK V2J37S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.144452
Info : nrf52.cpu: Cortex-M4 r0p1 processor detected
Info : nrf52.cpu: target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for nrf52.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x00025316 msp: 0x200013b8
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000a80 msp: 0x20000400
** Programming Started **
Info : nRF52832-QFAA(build code: E1) 512kB Flash, 64kB RAM
Warn : Adding extra erase range, 0x00039df0 .. 0x00039fff
** Programming Finished **
** Verify Started **
** Verified OK **

So it seems that everything has been flashed fine. But the ibeacon stays dead, the led does not light up after holding the button. Any idea what I could try? I also tried to change to order of flashing operations, unfortunately it did not help.

Thanks.

@kyto247
Copy link

kyto247 commented Nov 16, 2021

I actually have same issue after flashing the .hex file. The NRF52832 stays dead and does not light up after the flashing . It would be great to get this working, any input would be great. Tks

@thbiela
Copy link
Author

thbiela commented Dec 16, 2021

@kyto247 have you made any progress?

@kyto247
Copy link

kyto247 commented Dec 18, 2021

@kyto247 have you made any progress?

It was probably a good few weeks back now that I last tried flashing the NRF52832. It seemed to flash fine on openocd with the ST link, but the beacon just stayed dead to me. I previously tried the NRF51822 beacon firmware, but had no success either. Maybe I did not do it right but I think I probably did. I used openocd successfully few years back reviving a bricked linkstation nas via JTAG.

@thbiela
Copy link
Author

thbiela commented May 12, 2022

@zilluss could you help us, please?

@zilluss
Copy link
Owner

zilluss commented May 29, 2022

@thbiela Can you upload a photo of the Beacon? Radioland Shenzhen updated the PCB with different pins for the LED and button. I'll upload a new firmware (along with some improvements) for the PCB you have.

@thbiela
Copy link
Author

thbiela commented May 30, 2022

Hi zilluss,

that would be wonderful! Is this picture ok?

IMG_20220530_071511

Best regards,
Thomas

@zilluss
Copy link
Owner

zilluss commented Jun 1, 2022

nrf52832_xxaa.hex.zip

Please try this file (This is the new version I didn't get to push to GH, it supports up to 50 locks and unlocks much faster).

@thbiela
Copy link
Author

thbiela commented Jun 2, 2022

You are my hero! It works perfectly. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants