Posts: 4
Registered: ‎02-23-2017

CP2102N Strange Issue



I've designed my first CP2102N board and I've a strange issue with CP2102N.


I'm sending data from Arduino in loop() function something like that:


void loop() {
  // read the analog in value:
  sensorValue = analogRead(analogInPin);

  // print the results to the serial monitor:
  Serial.print("sensor = ");

  // wait 2 milliseconds before the next loop
  // for the analog-to-digital converter to settle
  // after the last reading:

Arduino continuously send this data with 100ms delay. Everytime I connect to serial port, I can see the data. Everything is working normally with 100ms delay.


When I change 100ms delay to 2ms delay, and connect to Serial port, I can see the data again but after disconnect and reconnect, no data is coming thru CP2102N serial port.


Why this happening?


Here is the quick demonstration:


Here is my schematic:


Thak you.



Posts: 4
Registered: ‎02-23-2017

Re: CP2102N Strange Issue

I think there is an issue with CP2102N Mac OS driver. I tried on Windows, everthing is good. On Mac OS 10.9 and 10.11, it's not working as expected.

Posts: 270
Registered: ‎03-03-2015

Re: CP2102N Strange Issue



I'm looking into this issue with the firmware team.  Does this problem only happen on your board, or can you reproduce it on an evaluation kit?  Are you using flow control?  What is the purpose of the signal connected to the DTR pin, and the series capacitor?




Posts: 4
Registered: ‎02-23-2017

Re: CP2102N Strange Issue



I don't have CP2102N Evaluation Kit. The problem is occurring only on Mac OS with or without flow control. I have two different boards with CP2102N, same issue on Mac OS. I've also soldered CP2104 to another board, everything is normal and working. I think it's driver issue on Mac OS. Like on the video above, first connect to serial port is OK, second connection is failing. So I have to reset CP2102N everytime to reconnect again.


DTR pin resets the slave device for enter bootloader.


To summarize:

  • Problem is only on Mac OS. On Windows, everything is normal.
  • Problem arises when slave device sends data very frequently to CP2102N. (i.e. with 2ms delay.)
  • First connection to serial port is OK, second connection fails.
Posts: 33
Registered: ‎04-05-2013

Re: CP2102N Strange Issue

To be clear - you are saying that the CP2102N has this behavior but the CP2104 does not, when used in the same situation?  I'm trying to narrow it down to the problem being something in CP2102N or the Mac driver.  Thanks.

Posts: 4
Registered: ‎02-23-2017

Re: CP2102N Strange Issue

Yes. Only CP2102N has this behavior on Mac OS in the same situation.


Thank you.

Posts: 2
Registered: ‎10-19-2016

Re: CP2102N Strange Issue

I can confirm that there is a problem with the CP2102N under MacOS. We have some customers who reported problems with our ESP-WROOM-32-Breakout with CP2102N as USB-UART bridge.

Posts: 13
Registered: ‎01-17-2017

Re: CP2102N Strange Issue

Hi. I have a few questions about the problem you are seeing.

In the video it appears to be receiving data until you disconnect and reconnect in CoolTerm. What happens if you do not disconnect?

What are the settings on the Mac side? Could it be the case that the Mac is using hardware flow control and asserting DTR causing the arduino to change its behavior?

I would suggest trying no flow control, CTS/RTS flow control, DSR/DTR flow control, and both types of flow control and record your results for each of these. It might make it more clear what is happening.

What happens if you vary the baud rate? My best guess at this point is that when you have the 10ms delay the buffer on the CP2102N doesn't fill up and assert DTR, but when you have 2ms delay that happens. Possibly if you increased the baud rate you would see the problem occur less frequently. I would try systematically varying the baud rate and recording results to try to get a better understanding as to what is occuring.

Do you have access to a logic analyzer or oscilloscope to see what is happening when data is not being received on the Mac? I would check to see if the arduino is still sending the data and also look at the state of the DTR line.

I'd like to help you with this, so please let me know what you find. If it is a bug in our Mac driver or in the CP2102N firmware, we would very much like to isolate and correct it.

Posts: 2
Registered: ‎10-19-2016

Re: CP2102N Strange Issue

We have not done further testings, but the problem occurs only on MacOS when a lot of data is sent (without flow control) to the CP2102N and the serial port is closed and then re-opened (data is sent also while the serial port is closed). After the re-opening no data is received - only after a complete disconnect and reconnect from USB.


Posts: 4
Registered: ‎03-25-2017

Re: CP2102N Strange Issue

I have the same issue with Linux.