Hi,
I am working on FRDM KW36 board. I am getting UART Rx overrun issue while receiving packets at baudrate more than 750kbps. It is woking fine upto 500 kbps baudrate.
Here is the code snippet for LPUART initialization
#define LPUART_BUFFER_LENGTH 1
#define BRIDGE_LPUART_BAUDRATE 1000000
CLOCK_SetLpuart1Clock(0x01U); //MCGFLLCLK - 40Mhz
LPUART_GetDefaultConfig(&config);
config.baudRate_Bps = BRIDGE_LPUART_BAUDRATE;
config.enableTx = true;
config.enableRx = true;
LPUART_Init(BRIDGE_LPUART, &config, BRIDGE_LPUART_CLK_FREQ);
LPUART_TransferCreateHandle(BRIDGE_LPUART, &g_lpuartHandle, __lpuart_driver_callback, NULL);
receiveXfer.data = g_rxBuffer;
receiveXfer.dataSize = LPUART_BUFFER_LENGTH;
LPUART_TransferReceiveNonBlocking(BRIDGE_LPUART, &g_lpuartHandle, &receiveXfer, NULL);
Please help me to figure out the issue. What is the maximum baud-rate that can be achieved in the FRDM KW36 board. Actually we are looking for 3mbps baudaret. please help me on this
Note :In release build, 1mbps baudrate is woking fine, But the same code gives UART rx overrun error in debug build.
Thanks in Advance
Excuse me, do you know to modify the data receiving buffer of FRDM KW36, that is, RX buffer, thank you very much for answering my question.
Hi Tang,
In the case of UART, you could take a look at the driver example for LPUART included in the SDK of the KW36. In that example, the size of the buffer can be changed, maybe it will be useful to you
Regards,
Mario
First of all, thank you very much for answering my question. In the lpuart-related driver, I only saw a code that modifies the ring buffer. I don't know if this modification can work. After the modification, the LPUART_ReadBlocking function can be used to receive data when receiving data.
Yes, I am asking for help from many people, of course I also thank you for answering my question.
Hi
At high baud rates you need to use DMA to ensure no overrun can take place. Interrupt or polling is likely to fail at some point and be generally unreliable due to the hard reaction delay requirements.
Regards
Mark
Complete Kinetis solutions for professional needs, training and support:http://www.utasker.com/kinetis.html
uTasker: supporting >1'000 registered Kinetis users get products faster and cheaper to market
Request Free emergency remote desk-top consulting at http://www.utasker.com/services.html
Excuse me, do you know to modify the data receiving buffer of FRDM KW36, that is, RX buffer? thank you very much for answering my question.