Description
Describe the bug
With STM32H750VBT6 running STM32duino_STM32SD Cardinfo Example, there is a reliability problem if the serial output is set to USB Serial. That is, by enabling USB Support "CDC (generic Serial supersede U(S)ART)". If USB Serial is enabled, there is over 50% chance card.init() fails.
If I disabled USB Serial and use the Generic Serial (PA10 & PA9), the CardInfo Examples worked perfectly every time. The reliability problem only occurs when running the Cardinfo with USB Serial.
To Reproduce
Install the latest version of STM32duino_STM32SD (v1.2.3) and FatFs (v2.0.3) via Arduino Library Manager.
Choose example STM32duino STM32SD->Cardinfo
Modify the baud rate to 115200
Enable: USB Support "CDC (generic Serial supersede U(S)ART)"
Run the Cardinfo example
Open the "Serial Monitor"
Screenshots
When it fails, the following message will be displayed.
Initializing SD card...initialization failed. Is a card inserted?
Desktop (please complete the following information):
- OS: MacOS
- Arduino IDE version: 1.8.8
- STM32 core version: 2.0.0
- Tools menu settings if not the default: Board part number: Generic H750VBTx
USB Support "CDC (generic Serial supersede U(S)ART)
Default for other items - Upload method: SWD
Board (please complete the following information):
STM32H750VBT6 from the below URL
https://www.aliexpress.com/item/1005001683272407.html?spm=a2g0o.productlist.0.0.637d1d300fFQ5d&algo_pvid=b237e656-d04b-422e-84af-8be8ed4042d9&algo_expid=b237e656-d04b-422e-84af-8be8ed4042d9-0&btsid=0bb0624116200479098028721ef47f&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603