2019-05-22 06:55 AM
I'm using the P-NUCLEO-WB55 development board, with only USB (CDC Device) enabled/configured through the STM32CubeIDE.
I'm sending data from my laptop to the board over USB CDC (Virtual Com Port) in Full-Speed mode.
Specifically, my laptop is sending 1041 bytes, and I'm using the following (simple) Python script (it depends on pyserial):
import serial
s = serial.Serial('/dev/cu.usbmodem206F389630361 or COM3 or /dev/ttyACM0')
msg = bytearray(1041)
for i in range(0, len(msg)):
msg[i] = 0xA5
print(s.write(msg))
When I run this script on Linux or Windows 10, everything works fine, i.e. the board receives the 1041 bytes sent by the laptop.
However, when I run this script on macOS, a lot of packets are lost. I'm not sure which ones specifically, but the board receives between 400 and 900 bytes instead of 1041.
Is it a macOS USB driver problem?
Any tips?
2019-05-22 07:59 AM
> Is it a macOS USB driver problem?
Observing the traffic on the USB bus using an USB analyzer or a USB-decoding capable LA or oscilloscope, would reveal the truth quickly...
JW
2020-05-19 08:43 AM
Bumping this, as it still an issue on MacOS not being able to send UART bytes to the microcontroller via the ST-LINK. If anyone has further information please share. This is very annoying.