Hi Ajay,
I have modified the KSDK2.0_FRDM-K64 uart polling code and the interrupt code, both these project can work with PTC16 and PTC17 without problems.
You can download KSDK2.0_FRDM-K64 from this link:
Welcome to Kinetis Expert | Kinetis Expert
Click the build an SDK, and choose FRDM K64 board, then download KSDK2.0_FRDM-K64 .
Now take SDK_2.0_FRDM-K64F\boards\frdmk64f\driver_examples\uart as an example:
1. polling_transfer project
Modified points:
(1) pin_mux.c file, void BOARD_InitPins(void)
void BOARD_InitPins(void)
{
CLOCK_EnableClock(kCLOCK_PortC);
/* Affects PORTB_PCR16 register */
PORT_SetPinMux(PORTC, 16U, kPORT_MuxAlt3);
/* Affects PORTB_PCR17 register */
PORT_SetPinMux(PORTC, 17U, kPORT_MuxAlt3);
}
(2) uart_polling_transfer.c
#define DEMO_UART UART3
#define DEMO_UART_CLKSRC UART3_CLK_SRC
2. interrupt project
(1) pin_mux.c file, void BOARD_InitPins(void)
void BOARD_InitPins(void)
{
CLOCK_EnableClock(kCLOCK_PortC);
/* Affects PORTB_PCR16 register */
PORT_SetPinMux(PORTC, 16U, kPORT_MuxAlt3);
/* Affects PORTB_PCR17 register */
PORT_SetPinMux(PORTC, 17U, kPORT_MuxAlt3);
}
(2) uart_polling_transfer.c
#define DEMO_UART UART3
#define DEMO_UART_CLKSRC UART3_CLK_SRC
#define DEMO_UART_IRQn UART3_RX_TX_IRQn
#define DEMO_UART_IRQHandler UART3_RX_TX_IRQHandler
Just follow my modification, then do the testing again, you can get the uart data in the PTC17 and can send the uart data to PTC16.
I also attached the main file for your reference.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------