Author Topic: Black Pill STM32F411 Stm32duino Virtual COM Port Signals Timing  (Read 1103 times)

0 Members and 1 Guest are viewing this topic.

Offline bb1Topic starter

  • Contributor
  • Posts: 40
  • Country: us
It is interesting to see signals on USB wires when Black Pill sends data to PC using Virtual COM port.
The attached PDF has several Scope and Hardware USB sniffer screenshots illustrating maximum data transfer speed and timing of data packets sent between the Black Pill and PC.
 
The following users thanked this post: thm_w

Offline bb1Topic starter

  • Contributor
  • Posts: 40
  • Country: us
Re: Black Pill STM32F411 Stm32duino Virtual COM Port Signals Timing
« Reply #1 on: December 18, 2021, 05:07:35 pm »
Writing data from PC to Black Pill is significantly faster than reading data from Black Pill.
To observe that, I used the following simple Arduino code:
void loop()
{
  if (Serial.available() > 0) {
    digitalWrite(pin, 1);
    Serial.readBytes(arr1, arrSiz);
    digitalWrite(pin, 0);
  }
}
Pin value is shown by blue trace, USB_DP is shown by the yellow trace on the scope screenshots.
For arrSiz=10000 the result can be seen on the scope screenshot readBytes_10000bytes_13mS.png. Time of the transfer is not well defined, and it may take up to 14 mS to transfer 10000 bytes from PC.

Hardware sniffer screenshot is shown on sniffer_500bytesToBlackPill.png for 500 bytes transfer. One can see that some OUT tokens are NAKed. All OUT transfers are separated by IN packets. In this case 500 bytes transfer took about 0.8 mS.
In other cases it can take about 0.6 mS.

Typical scope screenshot for 500 bytes transfer is shown on readBytes_500bytes_750uS.png.



 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf