Hi,
We've been working on a POC that uses LPUART0 lines on the KL03 device. When we transmit data to a bluetooth module (HC-05), we see data as expected, however when we connect the same Rx/ Tx through a USB-Serial adaptor to a computer we see garbage. We are using the fsl_debug_console component. As normal, we tried checking ground connections and different baud rate settings but that didn't help. Did any of you come across something like this? Can anyone help?
Additional information: I notice that when you select a baud rate with Clock source = "Auto Select", the assigned baud rate is little off the required value. e.g. when we select 19200 baud, the actual configured baud seems to be 19230.769 baud.
When I select PCLK as the clock source the selected and configured bauds seem to be fine. Either ways the result is still the same, I see garbage on my terminal window.
Hi
I also create an example based on FRDM-KL03Z with LPUART0 output "hello world" to on board OpenSDA virtual serial port. There doesn't appear garbage data, please check below picture for my test result:
I attached my test project for your reference.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you for the response Hui Ma. We are using custom hardware that does not has a OpenSDA interface. We are directly connecting the UART0 RX, TX lines to a PC through a Serial to USB converter. By the way, we see data as expected while using a HC05 bluetooth module directly connected to the RX, TX lines of the KL03. I think it is got to do something with the clock configurations.
Hi
I am using a CP210x USB to UART Bridge board to get LPUART0 transmit data.
I still could get the correct data at serial terminal.
Below is my test environment:
I would recommend to check the serial to USB converter tool, if there with another one could try with it.
And also could try to slow down the baud rate to 9600 to check if there with the correct data output at serial terminal.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I tried with two different USB to serial converters.
Following is the screen shot for the program you shared. I think it is got to do something with the clk settings, but unable to nail down the exact parameters to tune.
Hi
For the KL03 IRC is factory trimmed with ±3% accuracy, which clock accuracy matches with UART spec requirement.
Have you checked the LPUART TX signal quality with scope? Is that signal robust?
And it also need to check serial terminal software. Could you try another PC serial terminal software?
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------