Hi, Michael,
From your following code, it appears that the LED is connected to P0_22(GPIO0_22), if it is the case, pls use the code.
anyway, pls check which pin is connected to LED.
BR
XiangJun Rong
int main(void) {
#if defined (__USE_LPCOPEN)
// Read clock settings and update SystemCoreClock variable
SystemCoreClockUpdate();
#if !defined(NO_BOARD_LIB)
// Set up and initialize all required blocks and
// functions related to the board hardware
Board_Init();
// Set the LED to the state of "On"
Board_LED_Set(0, true);
#endif
#endif
// Chip_GPIO_WriteDirBit(LPC_GPIO, 3, 26, true);
// Chip_GPIO_WritePortBit(LPC_GPIO, 3, 26, true);
LPC_IOCON->PINSEL[1] &= !(1 << 12);
LPC_IOCON->PINSEL[1] &= !(1 << 13);
LPC_IOCON->PINMODE[1] &= !(1 << 12);
LPC_IOCON->PINMODE[1] &= !(1 << 13);
LPC_GPIO[0].MASK = 0x00000000;
LPC_GPIO[0].DIR |= 1<<22;
LPC_GPIO[0].SET = 1<<22;
// LPC_GPIO[3].MASK = 0x00000000;
// LPC_GPIO[3].DIR = 0xFFFFFFFF;
// LPC_GPIO[3].SET = 0xFFFFFFFF;
volatile uint32_t check = LPC_GPIO[0].PIN & 0x00400000;
// Force the counter to be placed into memory
volatile static int i = 0 ;
// Enter an infinite loop, just incrementing a counter
while(1) {
LPC_GPIO[0].SET = 1<<22;
delay();
LPC_GPIO[0].CLR = 1<<22;
delay();
i++ ;
}
return 0 ;
}
void delay(void)
{
unsigned int j;
j=0;
for(unsigned int i=0; i<100000;i++)
{
j++;
}
}