Content originally posted in LPCWare by omegahacker on Mon Jun 02 13:40:33 MST 2014
Quote:
My confusion would be where the cr_start_m0.c code I just put in place (replacing my broken M0 start) still would do the same?
I've analyzed the cr_start_m0 code and confirmed it's execution with the debugger: it reads 0xfeffffff from RGU_RESET_ACTIVE_STATUS1, determines that the core is in reset, and writes 0x00000000 to RGU_RESET_CTRL1. Nothing more, nothing less.
The behavior I'm seeing is particularly strange:
I set up the M4 code to configure and loop-write to the SCT, and start the M0 except the M0 is nothing but a while(1) loop. When I hard-reset the board then start GDB, two things happen:
- the attached LED starts flashing as expected with the M4's SCT loop
- gdb claims a SIGINT at ResetISR, with the address matching the M4's codebase
These two things should be mutually exclusive.
However, when I re-run gdb without a hard reset, it pushes the code into RAM again and soft-resets the core, and then "runs" perfectly fine from then on out without any faults.