NOTICE: This website will be shut down in the near future. Product content has moved to Forum content and FAQs have been moved to We encourage you to create a user account on to use the new community forums and access NXP microcontroller content. We greatly appreciate your contributions and look forward to seeing you at our new web location.


SWO Trace setup for LPC18xx

lpcxpresso-support's picture

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.

Your rating: None