Hi,
In our LPC54018 customized (208 Pins) board, we checked the IO pins port0 13th PIN and port0 14th PIN by configuring the PINs as GPIO and toggled it. We cannot even toggle the PINs. Even after setting the pin it remains 0 (GPIO->B[0][13] = 1). Is it due to the port0 12th pin configured for SWDIO for ULINK2 communication.
Here I have attached the GPIO PIN configuration
CLOCK_EnableClock(kCLOCK_Iocon);
CLOCK_EnableClock(kCLOCK_Gpio0);
GPIO->CLR[0] = 1 << 13;
GPIO->CLR[0] = 1 << 14;
GPIO->DIR[0] |= 1 << 13;
GPIO->CLR[0] = 1 << 14;
GPIO->B[0][13] = 1;
GPIO->B[0][14] = 1;
IOCON->PIO[0][13] = ((IOCON->PIO[0][13] &
/* Mask bits to zero which are setting */
(~(IOCON_PIO_FUNC_MASK | 0x30 | IOCON_PIO_DIGIMODE_MASK)))
/* Selects pin function.
* : PORT013 (pin 141) is configured as PIO0_13. */
| IOCON_PIO_FUNC(PIO013_FUNC_ALT0)
|0x00
/* Select Analog/Digital mode.
* : Digital mode. */
| IOCON_PIO_DIGIMODE(PIO013_DIGIMODE_DIGITAL));
IOCON->PIO[0][14] = ((IOCON->PIO[0][14] &
/* Mask bits to zero which are setting */
(~(IOCON_PIO_FUNC_MASK | 0x30 | IOCON_PIO_DIGIMODE_MASK)))
/* Selects pin function.
* : PORT014 (pin 144) is configured as PIO0_14. */
| IOCON_PIO_FUNC(PIO014_FUNC_ALT0)
|0x00
/* Select Analog/Digital mode.
* : Digital mode. */
| IOCON_PIO_DIGIMODE(PIO014_DIGIMODE_DIGITAL));
while(1)
{
GPIO_PortToggle(GPIO, 0, (1 << 13));
GPIO_PortToggle(GPIO, 0, (1 << 14));
}
After changing the flexcomm 0 to 4, there we checked the SDA and SCL pins by configuring it as GPIO, it gets toggled. And then we used it for I2C communication. Still we didn't got the clock signal.
How can we confirm that the clock configured for the specified flexcomm. Is there any way for that?
While debugging the code, we're the flexcomm shows the master idle after sending the slave address and start condition, it becomes master busy.
We need an immediate response from you.