I've written a tiny program which toggles an LED for the DA14683 Pro Development Kit. The program is running from the RAM. When I upload this program manually (without the IDE) this also works fine.
When I upload the exact same program (with the exact same debugger) to our board (an LED is also at P1/5) the CPU always get stuck in the ROM at address 0x07f01dfc (which is a loop onto itself). Maybe this is the "Wait Forever" part of the boot sequence.
When I set the SP manually to 0x07fd0000 and the PC to 0x07fc0201 (according to the bin/elf) the CPU always stops in 0x07f000e6 (which may be a handler also in the ROM).
Is there maybe something I need to change in the OTP first to the change the behaviour on the CPU on our board? I maybe the debugger needs to set something first before starting the application?
I think I found the solution myself. Just for others, when starting from RAM the Dialog IDE sends the following commands to the debugger
monitor reset 0
monitor sleep 10
监控停止
monitor memU32 0x7fd0000 = 0xdeadbeef
monitor memU32 0x7fd0004 = 0xdeadbeef
monitor memU32 0x7fd0008 = 0xdeadbeef
monitor memU32 0x7fd000c = 0xdead10cc
monitor memU32 0x400c3050 = 1
监测睡眠500
monitor reset 0
monitor memU32 0x7fd0000 = 0x0
monitor memU16 0x50000012 = 0xAB
monitor reset 0
This needs to be done before the software is uploaded. This may not be necessary on my ProDK because there is something in the flash. I could not fully verify this sofar because my debugger immediately exits its session after issueing the command to set the clock source.
0x50000012 = 0xAB
Hi marss,
Thanks for your posts! You should not change anything in the OTP. Can you please let us know if you figured your issue out?
Thanks, PM_Dialog