Hi Bogdan,
Great to hear someone is looking at montor mode :) A very under-utilised feature of M3 IMO, and the potential for some great things!
As Igor has explained, we attach to the target as a debugger (HALT mode), so we can respond to semihosting requests via JTAG, just like a host based debugger would. This allows us to do things like service semihosted file requests which is pretty neat.
We don't actively stop you messing with anything; it turns out after a little investigation it is actually the core itself that is not allowed to write this register. See:
That is a bit of a gotcha, so here are some ideas to ungotcha us. One is that we provide a call to disconnect the debugger. I have a build of something like this which actually turns the whole interface off assuming USB is disconnected, but then you'd loose the USB serial/power, which may not be so neat. So perhaps a call to detach the debugger only could be a start.
As an alternative, maybe we could cascade it in some way? I've not looked to see if it is actually possible, but maybe when a HALT mode unhalts, it could cascade to the monitor if enabled? It sounds like it doesn't do this by default from your experiments, so it'd need some investigation to see if this is possible/sensible/a good idea.
If it is of interest, I could provide you the powerdown interface build, as long as you realise you'll have to run your tests with it disconnected from USB. But it may be interesting to see what is possible.
Simon
Hi,
I'm trying to use the FPB unit on the LPC1768 to activate a debug monitor exception on address match, and I can't make it to work apparently. The exception is never executed. I was wondering, does mbed do something special with the debug monitor? I'm asking because I noticed that FP_CTRL has ENABLE (bit 0) set to 1 when my application starts, which shouldn't happen according to the documentation.
Thanks,
Bogdan