Well let’s face it, modern microcontrollers are complicated. The User Manual for the LPC55S69 has 1148 pages (Rev 1.3) and that does not include any of the electrical characteristics – see the Datasheet (129 pages) nor does it include the details around the core or instruction set (see ARM documentation) . So there is a lot of technical information to read, and don’t get me started on the pin multiplexing… Well actually, do get me started on the pin multiplexing because that is my focus this week.
This week I turned my attention to writing a very simple example project in MCUXpresso IDE to run on the ARM Cortex® M33 core inside the LPC55S69. As in previous weeks I am again using the LPC55S69-EVK from NXP. My plan is to use this board every week but I have learned recently a few details about a new ultra-low-cost board. It’s going to be AMAZING and I’ll share more details with you when I can.
The project will use a CTIMER timer output with PWM to change the brightness of the green LED on the board. An 10 ms interrupt from the MULTI-RATE TIMER will ramp the brightness up and down so that the LED pulses. And lastly, an interrupt from the USER switch on the board will generate a PINT interrupt and this is used to mask the LED output.
With the increasing complexity of the microcontroller and the extensive pin multiplexing, we will introduce the Pin Multiplexing “Config’ tool within MCUXpresso IDE> This gives us a very quick way of selecting the function for each pin of the microcontroller from the list of available functions. In the video I’ll show you how find out where the Green LED is connected on the LPC55S69-EVK and then control it in hardware from the match register in the CTIMER. We’ll find that the CTIM2MAT2 function is the 3rd alternate function for the GPIO pad PIO1_7 and quickly configure it with the Pins Config tool.
The video on my embeddedpro® YouTube channel is not a programming tutorial. So I’ll show you how to use the MCUXpresso tools to generate the project, but you’ll need some software to make it all happen. The video shows you how to cut and paste the code into MCUXpresso IDE and so you should get your LED pulsing without too many challenges. Use this link to download a text file with the source code:
And for your interest, I normally use a heart-beat indication like this on every project that I develop just so that there is a visual indication of activity on the board. And by changing the parameters I can make a range of LED patterns that provide more information about what the software is up to. So I use a faster pattern of blinking to warn me about a fault.
To be fair, there are quite a few online tutorials about the MCUXpresso IDE Pins Config tool. And so you can watch my video here…
… but I ‘borrowed‘ some tips from NXP and Erich at the following locations:
Please let me know how you get on, and don’t forget to share the information with your friends. And come back next Monday when I’ll cover the Clocks Config tool in MCUXpresso IDE in some more details.