Content originally posted in LPCWare by Freefly on Wed May 25 04:21:14 MST 2011
Hi everybody,
I'm new to cortex M0 controllers and have some problems from the beginning.
I can't change the function of the PIO1_0 pin. My code is following:
LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 6);
LPC_IOCON->R_PIO1_0 = 0xC9; // Function PIO1_0
LPC_GPIO1->DIR |= (1 << 0); // PIO1_0 output
LPC_GPIO1->DATA |= (1 << 0); // Set PIO1_0
LPC_GPIO1->DATA &= ~(1 << 0); // Clear PIO1_0
But when I debug this code, the function is still set to "TMS" and did not changed.
Are there some debugger setting should be set? Or what is wrong with this code?
Best regards
Alex