Nico Coesel pisze:
> Did you try to relax the MAM timing (more waitstates)? The errate sheet
> does mention some problems with the MAM without a work around. I don't
> know if switching off the MAM is something that you want. This slows the
> device down considerably so you are not debugging the software at it
> actual speed.

I didn't mean disabling the MAM totally. I'll try to describe that in 
more detail

My code starts the PLL and MAM. When the code is flashed into the chip 
and run - everything works fine. Always.

Now when I try to debug that code, there is the "lpc2000 reset issue" - 
the core cannot be reset into the halted state. The core is first "just 
reset", so it is running and executing code - starting the PLL and MAM - 
for some time. The MAM and PLL are fully operational, enabled and 
running. Now the core is halted (but the MAM is enabled, it is working 
and buffering the instructions and data) and "soft_reset_halt" is 
performed. Generally this does nothing more than clearing all of the 
core regs, including the PC, which makes it look like a real reset. But 
the MAM is still there, enabled. Now when I try to debug the code, it 
fails in some mysterious way during the stack frame adjustments just 
before main(). Then - in main() PLL and MAM are (re-)enabled again. So I 
need to disable MAM just before I start the debug session, which is 
after the "soft_reset_halt" - it is enabled later, in the right moment, 
so I can get full performance.

That's why the complete gdb initialization in Eclipse looks like:
monitor reset
monitor soft_reset_halt
monitor mww 0xE01FC000 0

the last line disables the mam (MAMCR = 0);

I hope that my actions are clear now.

Anyway - maybe that would be good to add more options to the 
soft_reset_halt procedure in OpenOCD - this could really disable 
peripherals like PLL, interrupts and accelerators like MAM - tracking 
this bug was REALLY hard.

4\/3!!
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to