Hi All,
I am using Kinetis K60: 100MHz MK60DN256VLQ10 with MCUXpresso SDK 2.0 for UART Rx application.
I referred SDK Driver example code for Rx/Tx data, but I am facing problem with receiving data in ISR of UART5, via terminal I am writing 12 Bytes of data but in ISR I am able to receive only 2 bytes not 12 bytes, mean I am not able to receive bulk data for UART5
It is mentioned in Ref. Manual that UART2 to UART5 is having no FIFO, only having Doubled buffer, what it mean?
Please help me out this problem
Below is my ISR code:
/**************** UART Handler definition *******************/
void UART5_RX_TX_IRQHandler(void)
{
if ((kUART_RxDataRegFullFlag | kUART_RxOverrunFlag) & UART_GetStatusFlags(UART5))
{
uint8_t data = UART_ReadByte(UART5);
printf("Rx : %u \n", data);
}
}
And UART5 Configurations :
int main()
{
uart_config_t config;
BOARD_InitPins();
BOARD_BootClockRUN();
UART_GetDefaultConfig(&config);
config.baudRate_Bps = 9600U; // also tried 115200U
config.parityMode = kUART_ParityDisabled;
config.enableTx = true;
config.enableRx = true;
config.txFifoWatermark = 0;
config.rxFifoWatermark = 1;
UART_Init(UART5, &config, CLOCK_GetFreq(kCLOCK_BusClk));
/* Enable RX interrupt. */
UART_EnableInterrupts(UART5, kUART_RxDataRegFullInterruptEnable | kUART_RxOverrunInterruptEnable);
EnableIRQ(UART5_RX_TX_IRQn);
uint64_t k = 0;
while (1) {
k++;
}
}
Thanks in advance