Hi, my app (cortex m3) needs to set up a breakpoint directly from code, in order to jump to an interrupt when an instruction from a certain address is fetched. This WITHOUT using a debugger.
Any hint or tutorial? I think the only possible way is the patch block but it seems quite complicated.
Best regards
Franto
Sorry for the delay.
Instead of using debug monitor, you could use a timer interrupt. For each step, set the timer interval to minimal to start off with, if the stacked PC is unchanged after return to the timer ISR, increase the timer interval by 1 to retry. Eventually, the "single stepping" of the instruction would suceed, and you can move to the next one, with the interval restart from minimun value.
Because the Cortex-M3/M4 has an interrupt entry latency of 12 cycle, and an interrupt exit latency possibly around 10 cycles (I can't remember the exact figure, could be 12 but I am not sure), I would choose the minimum interval as 20 cycle as starting point and increase it 1 cycle at a time.
regards,
Joseph