Content originally posted in LPCWare by S Kojima on Thu Apr 21 22:24:30 MST 2016
Dear fellows,
I've been trying to activate MTB on LPC824 under Keil uVision environment.
But, no success yet.
I'd done it also on LPC812. It works.
For LPC812 (or 810), the method for activation of MTB under uVision enviuronment is done thru debugger's .ini file, which interrupts to do specified operation thru debugger just before LPC81x chip starts after reset.
But, on LPC824, I do not think I can apply the same method.
Mainly because the boot code in LPC82x's ROM blindly clears bit26 of SYSAHBCLKCTRL, which is a newly implemented clock gate control register bit for MTB block on LPC82x. LPC81x serise does not have such one.
In fact, LPC824 is the only MCU with Cortex-M0+ plus MTB feature target MCU that MTB feature can be utilized under uVision.
As well as LPC81x, Freescales Kinetis-L, Cypress FM0+, ATMEL SAM-D/-L etc.., all works by applying the same method to activate MTB feature.
So, I'm now giving up to use .ini file method under uVision environment for LPC82x.
As a quick-and-dirty alternative, I write the activation code portion and execute it as a part of SystemInit() function.
Then,....
MTB block itself seems to be working. The RAM memory contents where specified as MTB is updated at every brach-type instruction execution.(Maybe, this is the proper "branch-trace" type implementation of MTB itself.)
But, still I can not see the window update of "Trace data" window of uVision.
Is there any more operation needed to get the expected uVision behavior for LPC824?
Regards,