nrf52 dk doesn't boot

Hi.
I'm using nrf52-dk and doing some bare-metal project with FreeRTOS: https://github.com/gproskurin/learning/tree/master/embedded/nrf52_lora

The problem is: after I flash binary (either using nrfjprog or openocd) and pass appropriate "reset" option, it doesn't reset. Pressing reset button doesn't work either. Even after power cycling or just connecting usb power from charger doesn't make it boot. It seems the only way to make it start firmware is to run openocd gdb server like this: "openocd -f ...openocd/scripts/board/nordic_nrf52_dk.cfg"

It starts gdb server:
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
    openocd.org/.../bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : J-Link OB-SAM3U128-V2-NordicSemi compiled Oct 30 2023 12:12:17
Info : Hardware version: 1.00
Info : VTarget = 3.300 V
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
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

After that, my firmware is started and works fine. I can even stop openocd gdb server immediately and firmware continues to run.

Questions are: how to make it reset properly after flash to start firmware? How to make it start firmware when it's power comes from usb charger or battery without usb host and without possibility to trigger it to start by starting/stopping openocd gdb server?

Parents Reply Children
No Data
Related