This guide will take you through clock configuration on the E1 Board. Setting the clock frequency of the MCU is one of the initial steps in starting a new E1 project or adapting the SDK example projects so that they run on the E1 board. This tutorial will guide you through the steps to configure the System Clock of the E1 in MCUXpresso IDE and to check its frequency using an oscilloscope.
To install MCUXpresso IDE you will need to register for a free NXP developer account. Installers are available for Windows 10, Linux & macOS. The example shows installation on a Windows 10 PC but the steps are similar on the other supported operating systems.
E1 has the LPC55S69JBD100 package on board. This project requires a single core (CM33_core0).
Only the default drivers are required for this project – you can always add drivers later during the developments cycle if required.
A new project will be created, and all the source files copied into a directory under your workspace.
The system clock requires setting to the correct frequency for the E1 board.
The default project sets the system clock at 150MHz using an external 32MHz crystal source via the Phase-locked Loop (PLL). The E1 board does not have the 32MHz external crystal fitted, so this setting cannot be used.
The SDK comes with several pre-defined Functional Group settings that will configure the clocks correctly and generate source code automatically.
The system clock signal is available on the clock out (CLKOUT) pin of the LPC55S69 MCU. To check the CLKOUT frequency a clock divider will be used to reduce the signal frequency so that it can be measured accurately using an oscilloscope.
Finally, use the Clocks Tool to generate the clock configuration source code in the project using these settings:
Now that the system clock is set up for the E1 Board, the CLKOUT signal can be multiplexed to one of the I/O pins so that it can be measured using an oscilloscope.
From the LPC55S69 User Manual https://www.nxp.com/webapp/Download?colCode=UM11126 the CLKOUT function is available on MCU pin PIO0_16, which is Pin 2 on the X100 Expansion connector of the E1.
The Pins Tool in MCUXpresso IDE can be used to map pin functions on the MCU to the I/O connectors on the E1 board. The Pin tool will generate the source code that is included in the project.
The IDE will return to the Developer view once the source code has been updated. Pin 2 on the E1 X100 connector is now mapped to the 1MHz CLKOUT signal, divided down by 96 from the 96MHz System Clock.
The project can now be built and run using the built-in debugger so that the CLKOUT signal can be measured.
The IDE will discover the LPC11U3x_CMSIS_DAP debug probe
The debugger will run-up to the first line in main() and then suspend. This is the default behaviour of the debugger.
The Printf statement will appear in the console pane.
The code will continue to run even when the debug session has ended.
The CLKOUT signal frequency can now be measured using an oscilloscope.
This guide has shown how to start a new E1 project using MCUXpresso IDE and configure the system clock using the clocks tool. The CLKOUT signal was then multiplexed and divided down so that it could be output to one of the I/O pins on the E1 board.
The MCU was set to run at 96MHz so the clock signal was divided by 96 to output a 1MHz signal which could be measured using an oscilloscope. The oscilloscope trace validated that the System Clock was running at the expected frequency.
You should now be able to configure the System Clock on the E1 using the MCUXpresso IDE for use in your own projects or adjust the settings for the SDK examples so that they run on the E1 board.
From a quick tap to smashing that love button and show how much you enjoyed this project.