We have a custom PCB board, and we’re making use of the CP2105 IC. But we’re getting junk data on the Serial output. Any idea on how to debug the issue?
The device is getting recognized and the baud rate is also verified.
Any suggestions are appreciated.
Please also check the baud rate (9600 , 115200, etc.,)
Have cross verified it
Please share the circuit diagram that you have followed or designed, and then we will be able to identify the issue
We have multiple boards of the same design. Other boards are working. Only board is giving an issue. So circuit is not an issue.
Have you used any ESD protection in your circuit?
Yeah. It’s there
Check TX and RX pins properly.
Device getting recognised just means that D+ and D- pins are working and IC is working.
That’s good but if you are receiving junk data it’s related to TX and RX line this has nothing to do with USB side.
So try to debug that.
Are you asking to check the traces?
Also, since I’m getting junk data doesn’t that mean there is proper connection?
Yes I am asking you to check with an Oscilloscope are you getting right bits at the end of the trace which is connecting to USBtoSerial IC just hook up TX line and check what you are getting.
Because that’s the same data that is being printed over the screen.
Junk data not necessarily means proper connection there “might” be something which is causing this data corruption(if you are saying that the baud rate is correct)
Is it possible to share the circuit diagram?or layout?
Also if circuit is fine then it might be IC issue swap with another IC and check if problem still persist.
Well desoldering and soldering QFN package is not a big deal if you have a soldering station.
Apart from that if circuit is working and this issue is just on this board it seems like a IC issue particularly but I Can’t tell until you probe TX line and update what you are getting.
So yes I want you to hook up the TX pin to an oscilloscope and check and decode the data coming start by sending “Hello” from MCU and see what you are getting.
OR
If you don’t want to get into that much trouble take a working USB to Serial converter that are dirt cheap and easily available in market connect your TX line to RX for that converter and see if you are getting right data, If yes then the issue is with the IC if No then the issue is with the data that is being transmitted (MCU).
Either way you will have your answer.
Also before starting all this check the pins pf QFN package if they have been soldered properly ,Cold solder joint can also cause this is sort of issue.
Use a thin pin multimeter for it.
Let me know your progress.
All the best.
Sure, will try it out. Thanks for the detailed reply
The IC is in QFN package. So I wanted to keep that as the last option.
Can you explain how you want me to check the Tx / Rx line? Just the connectivity between the pin and connector?
Hello Paresh,
Are you able to send data over TX pin like TX Pin is working or not? That you can check by sending some data from USB UART to your controller and read data over controller.
If that is working fine it means your TX PATH is working while issue is into RX PATH or let me know if both are not working.
Also, you can try testing using loopback like connect TX and RX together and verify that sent data are received on RX pin or not.
Which boardrate are you using? Have you checked with all standard boardrates like 9600, 115200 etc?
Regards,
Ritesh Prajapati
I have checked with different baud rates. All are giving junk values.
Can you explain how you want me to check the Tx line? Just the connectivity between the pin and connector?
Hello Paresh,
if you want to check TX Line of MCU then send data from MCU and check received data is correct over Serial Terminal or not.
If you want to check RX Line of MCU then send some data from Serial Terminal and validate into MCU with some ISR logic to print received data and check data are same or not. Also print received data into HEX print so that you can have idea like if any garbage value is received or not.
Let me know if still you have any questions.
Regards,
Ritesh Prajapati
Sure, I will check it out.
Has your problem been resolved?