Report
5 years, 2 months ago.

Reconfiguring Pin Functions on an Mbed

Hey, I'm using the FRDM-KL25Z and I want to connect it to another FRDM-KL25Z board; however, all my UART pins are in use already. I was wondering if there was any way to reconfigure the USBTX/USBRX ports on that board to two pins say PTE2 and PTE3?? (meaning i'll only use the usb of one FRDM-KL25Z board for terminal connection to my pc while the other one obviously won't be able to). Thanks.

Comment on this question

1 Answer

5 years, 2 months ago.

These are the pins that can be used for the UART, UART0 is the one used for USBTX and USBRX (btw, on the pinout you also see them as the stdio pins, those are the USBTX and USBRX pins, they are internally also connected to the serial<>usb bridge).

/************UART***************/
const PinMap PinMap_UART_TX[] = {
    {PTC4,  UART_1, 3},
    {PTA2,  UART_0, 2},
    {PTD5,  UART_2, 3},
    {PTD3,  UART_2, 3},
    {PTD7,  UART_0, 3},
    {PTE20, UART_0, 4},
    {PTE22, UART_2, 4},
    {PTE0,  UART_1, 3},
    {NC  ,  NC    , 0}
};
 
const PinMap PinMap_UART_RX[] = {
    {PTC3,  UART_1, 3},
    {PTA1,  UART_0, 2},
    {PTD4,  UART_2, 3},
    {PTD2,  UART_2, 3},
    {PTD6,  UART_0, 3},
    {PTE23, UART_2, 4},
    {PTE21, UART_0, 4},
    {PTE1,  UART_1, 3},
    {NC  ,  NC    , 0}
};

So can I just connect my second board to the stdio tx/rx pins?? would that work??

posted by Kosy Onyenso 14 Feb 2014

Yeah that should work. But you can also use one of the other pins, then it is completely seperate from the USB connection.

posted by Erik Olieman 14 Feb 2014

Thanks tried it and it worked

posted by Kosy Onyenso 17 Feb 2014

To post an answer, please log in.