da14683 hangs in ROM while booting

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
marss
Offline
Last seen: 10 months 5 days ago
Joined: 2015-05-08 10:18
da14683 hangs in ROM while booting

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?

Device: 
marss
Offline
Last seen: 10 months 5 days ago
Joined: 2015-05-08 10:18
I think I found the solution

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 halt
monitor memU32 0x7fd0000 = 0xdeadbeef
monitor memU32 0x7fd0004 = 0xdeadbeef
monitor memU32 0x7fd0008 = 0xdeadbeef
monitor memU32 0x7fd000c = 0xdead10cc
monitor memU32 0x400c3050 = 1
monitor sleep 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

PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi marss,

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