LPC1549 blink darn you, blink!

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

LPC1549 blink darn you, blink!

696 Views
DanielLongo
Contributor I

I have the LPC1549 on its own board and I am trying to get familiar with MCUExpresso by using the periph_blinky example. It builds and flashes successfully. Since it is not on the development board, I need to reassign the LED pins. It is clear in the systick.c file where the LED pins are set:

Board_LED_Set(0, false);

Board_LED_Set(1, true);

 

However, I can't find where the pins are defined. Where do I find where pins "0" and "1" are defined? I need to change them to PIO0_22 and PIO0_23.

Thanks!

0 Kudos
Reply
1 Reply

127 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @DanielLongo 

You can find it in board.c

Harry_Zhang_0-1782879080472.png

 

The default pins "0" and "1" are 25 3

If you want to change them to PIO0_22 and PIO0_23.
You just need to change to
#define MAXLEDS 3
static const uint8_t ledpins[MAXLEDS] = {22, 23, 1};
static const uint8_t ledports[MAXLEDS] = {0, 0, 1};

Hope this will help you.

BR

Harry

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2067548%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELPC1549%20blink%20darn%20you%2C%20blink!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2067548%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20have%20the%20LPC1549%20on%20its%20own%20board%20and%20I%20am%20trying%20to%20get%20familiar%20with%20MCUExpresso%20by%20using%20the%20periph_blinky%20example.%20It%20builds%20and%20flashes%20successfully.%20Since%20it%20is%20not%20on%20the%20development%20board%2C%20I%20need%20to%20reassign%20the%20LED%20pins.%20It%20is%20clear%20in%20the%20systick.c%20file%20where%20the%20LED%20pins%20are%20set%3A%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CP%3E%3CSPAN%3EBoard_LED_Set(0%2C%20false)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EBoard_LED_Set(1%2C%20%3C%2FSPAN%3E%3CSPAN%3Etrue%3C%2FSPAN%3E%3CSPAN%3E)%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CP%3EHowever%2C%20I%20can't%20find%20where%20the%20pins%20are%20defined.%20Where%20do%20I%20find%20where%20pins%20%220%22%20and%20%221%22%20are%20defined%3F%20I%20need%20to%20change%20them%20to%20PIO0_22%20and%20PIO0_23.%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2388734%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LPC1549%20blink%20darn%20you%2C%20blink!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2388734%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F246820%22%20target%3D%22_blank%22%3E%40DanielLongo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20find%20it%20in%20board.c%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Harry_Zhang_0-1782879080472.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Harry_Zhang_0-1782879080472.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F390854i46A4EDF03CE15D9E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Harry_Zhang_0-1782879080472.png%22%20alt%3D%22Harry_Zhang_0-1782879080472.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThe%20default%20pins%20%220%22%20and%20%221%22%20are%2025%203%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20want%20to%20change%20them%20to%20PIO0_22%20and%20PIO0_23.%3CBR%20%2F%3EYou%20just%20need%20to%20change%20to%3CBR%20%2F%3E%23define%20MAXLEDS%203%3CBR%20%2F%3Estatic%20const%20uint8_t%20ledpins%5BMAXLEDS%5D%20%3D%20%7B22%2C%2023%2C%201%7D%3B%3CBR%20%2F%3Estatic%20const%20uint8_t%20ledports%5BMAXLEDS%5D%20%3D%20%7B0%2C%200%2C%201%7D%3B%3CBR%20%2F%3E%3CBR%20%2F%3EHope%20this%20will%20help%20you.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EHarry%3C%2FP%3E%3C%2FLINGO-BODY%3E