Wednesday 22 July 2015

Debugging in EmBlocks part 1: LPC1347 core speed and .SVD files

I now have my Jlink up and running and debugging the EzSBC2 in EmBlocks. Since I am a bit suspicious how the mbed library handles things, I wanted to check the core clock speed from the debugger.

Checking the core speed from System Registers


However, when I tried to look at the System Registers debug window to verify that my LPC1347 is indeed running at the correct MHz, the window was empty.

What we need is a so-called device description file (.SVD) that describes the internal registers of the MCU to the debugger.

You can get the .SVD for LPC1347 from NXP lpcware site here. 

Stick the .svd file path into your Debug->Interfaces settings thus:


After I had put in the .svd and restarted the debugger, I finally got the info I needed:

NOTE: you will see register values only when the debugger is halted !! NOT when the MCU is running.

SYSPLLCTRL says MSEL is 5. Therefore main clock is (MSEL+1)*oscillator (12 MHz) = 72 Mhz.
SYSAHBCLKDIV says DIV is 1, therefore core clock is main / 1.

= System Core Clock is 72 MHz, as intended.

No comments:

Post a Comment