SWO Trace setup for LPC18xx

Showing results for 
Show  only  | Search instead for 
Did you mean: 

SWO Trace setup for LPC18xx

Senior Contributor I

Clock Configuration

SWO Trace needs to be configured to match the current MCU clock speed in order to function correctly. Typically the LPCXpresso IDE can automatically detect this from the SystemCoreClock global variable.

However some older example code based on the older LPC18xx Peripheral Driver Library (PDL) codebase - for instance the legacy examples for the NGX and Hitex boards found in the "install_dir\lpcxpresso\Examples\NXP\LPC1000\LPC18xx" subdirectory of your LPCXpresso IDE installation - actually set SystemCoreClock incorrectly to 96000000 (96MHz). If you enter this value into the Clock speed setting of the SWO Config view, then you will not see any SWO trace data displayed.

For these PDL based examples, the actual setting you need to enter into the Clock speed setting is 72000000 (72MHz).

Note : There are no such issues if you are using projects based on LPCOpen - here the value of SystemCoreClock can be used directly.

For more information:

Labels (1)
0 Kudos
0 Replies