STM32H7 USB CDC Read Fails on Mac Mini M4 (macOS 15.5)
Recently I’ve been developing a host application on a Mac Mini (Apple M4, Sequoia 15.5) using Xcode. It communicates with a STM32H7 board via USB CDC, using the internal PHY at 12 Mbps. The USB CDC code is auto-generated by CubeMX with all default parameters. The board works perfectly with serial tools on Windows.
When the same board is connected to the Mac Mini, it successfully enumerates two devices: /dev/tty.usbmodem and /dev/cu.usbmodem. Regardless of which one selected to communicate, writing always succeeds and the board receives the data correctly and sends respond back.However, for some reason, the Mac computer “drops” the incoming data—the application’s read() function never gets anything.
I’ve already tried the following combinations:
- Reading and writing from tty or cu device
- Blocking and non-blocking reads (including background event-listening methods)
- Enabling DTR and/or RTS
- Using third-party libraries like ORSSerialPort
None of them worked. Also tried some serial tools on Mac, no good luck.
To verify it's not a board issue, I also tested with a NUCLEO-H743ZI2 board configured only with a simple USB CDC echo function. It works perfectly on Windows, but on the Mac Mini, the same problem occurs: the serial port can only write, not read.
Has anyone encountered a similar issue? Any help would be greatly appreciated.
