This is a little different. Apparently, the LPC802 board SDK / BSP is already installed in MCUXpresso, but you can’t compile anything beyond the simple printf example. Anything that requires the LPC8xx.h file won’t compile. So I reimported the SDK like I did for the KL25 and KL43. That means that you see two versions of the board. But at least I can compile stuff now. Download it from here.
Documentation is pretty sparse… but oh… there seem to be a few good sites:
- https://ucexperiment.wordpress.com/2015/02/22/lpc810-breakout-board/
- https://microdig.wordpress.com/category/lpc800
- http://67.222.144.123/lpc800um/
- https://microdig.wordpress.com/category/lpc800/
So I got a basic LED blinking project up and running:
#include "LPC802.h" #define LED_RING (17) #define LED_EYES (7) #define LED_UMOUTH (8) #define LED_LMOUTH (9) #define LED_SMOUTH (12) #define LED_USER1 (8) #define LED_USER2 (9) #define LED_USER3 (12) int main(void) { // Turn on the clock to the GPIO Module // reference: http://67.222.144.123/lpc800um/#RegisterMaps/gpio/c-Basicconfiguration.html SYSCON->SYSAHBCLKCTRL0 |= (1UL<<SYSCON_SYSAHBCLKCTRL0_GPIO0_SHIFT); // Configure the pin // REference: http://67.222.144.123/lpc800um/#RegisterMaps/gpio/c-GPIOoutput.html // Set data direction on GPIO to Output. GPIO->DIRSET[0] |= ((1UL<<LED_USER1) | (1UL<<LED_USER2) | (1UL<<LED_USER3) | (1UL<<LED_RING) | (1UL<<LED_EYES)); // Change the LED values GPIO->SET[0] = (1UL<<LED_USER1); GPIO->SET[0] = (1UL<<LED_USER2); GPIO->SET[0] = (1UL<<LED_USER3); GPIO->SET[0] = (1UL<<LED_RING); GPIO->SET[0] = (1UL<<LED_EYES); GPIO->CLR[0] = (1UL<<LED_USER1); GPIO->CLR[0] = (1UL<<LED_USER2); GPIO->CLR[0] = (1UL<<LED_USER3); GPIO->CLR[0] = (1UL<<LED_RING); GPIO->CLR[0] = (1UL<<LED_EYES); while (1) { asm("nop"); } // end of while(1) } // end of main