Is it possible to change I2C pin as UART pin in LPC824?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Is it possible to change I2C pin as UART pin in LPC824?

1,423 次查看
signalssystems
Contributor I

Hi,

Now  I am using LPC824 microcontroller.

I want to configure PIO0_10 as the UART1_TX pin.

The default fuction of PIO0_10 pin is I2C_SCL.

In my code i disabled that function and make that pin as uart_tx.but i did not get the proper output in uart terminal.

Is it possible to configure I2C pin as UART pin.

my configuration is,

void Init_UART_PinMux(void)
{
/* Enable the clock to the Switch Matrix */
LPC_SYSCTL->SYSAHBCLKCTRL |= (1<<7);

Chip_Clock_SetUARTClockDiv(1); /* divided by 1 */



Chip_SWM_DisableFixedPin(SWM_FIXED_SWCLK); //Uart1_rx pin
Chip_SWM_DisableFixedPin(SWM_FIXED_I2C0_SCL); //Uart1_tx pin



Chip_SWM_MovablePinAssign(SWM_U1_RXD_I, 3); //rx_uart1
Chip_SWM_MovablePinAssign(SWM_U1_TXD_O, 10);//tx_uart1

/* Disable the clock to the Switch Matrix to save power */
LPC_SYSCTL->SYSAHBCLKCTRL &= ~(1<<7);

}

thanks in advance.

0 项奖励
回复
1 回复

1,009 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Signal Systems,

Are you placing a external pull-up resistor on the PIO0_10 pin? Since this pin is a true open-drain pin you will need an external pull-up resistor for it to work.


Hope it helps!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 项奖励
回复