Hello,
I been having some difficulties to control P0_26 on lpc54102. I know this pins is used to contro i2c1, but i our pcb design we map this pin to be used gpio (output), but I been having a hard time doing this, i feel kinda dumb hahah.
I modified the blinky.c example code:
Solved! Go to Solution.
both ports of the gpio are initialized. The pins are type I and I can control with the same method pins:
the only ones that i can't control is those 2:
IOCON are configured as follow:
but the state of the gpio no matter what remains low.
Hi, @skanda19
I use the lpcxpresso54201 development board to control the LED blink of P0_26 (connect J2-16(P0_26)->J1-14(LED_GREEN)), for details, see the attached project configuration.
Hope this helps you.
Best regards, Alex
hey alex! thanks for the support,
just to make sure:
you're initializing gpio (clk enable), setting iocon as gpio mode and setting pin 0_26 as alternate func 0,setting the pin as output and writting to B[port0][pin26].
am I correct ? or am I missing something ?
Hi, @skanda19
Yes, I multiplexed P0_26 in gpio mode, initialized gpio (clk), and then wrote 0 or 1 to the pin to control the blink of the led.
Best regards, Alex
Hello @skanda19
You can refer to "led_blinky" demo to config gpio.
Check whether enabled gpio clock.
BR
Alice