I recently reported issues using USB-CDC on the OTG port of 407-DISCOVERY board. Apparently others have reported issues with Linux hosts in the past that have remained unresolved.
viewtopic.php?f=16&t=2264&start=20
I don't like this sort of 'not tested on linux' situation, so I've decided to dig into this a bit.
I have found that the DISCOVERY-MEMS demo does work from the debugger.
Starting the elf file under GDB produces a ttyACM device in the system logs
Code: Select all
<gdb> monitor reset haltdmesg output:
Code: Select all
[47173.523020] usb 2-4: Manufacturer: STMicroelectronics
[47173.523025] usb 2-4: SerialNumber: 310
[47173.526233] cdc_acm 2-4:1.0: ttyACM0: USB ACM device
[83375.156060] cdc_acm 2-4:1.0: failed to set dtr/rtsNote that this is different to the "-110" power related errors I got when running outside the debugger where the device failed or did not even appear at all.
Now letting it run, the failed device gets deleted, a new one created; the <ch> command shell appears and the accelerometer demo works:
Code: Select all
<gdb> continue
Code: Select all
[83775.954971] usb 2-4: USB disconnect, device number 11
[83775.957994] cdc_acm 2-4:1.0: failed to set dtr/rts
[83777.331040] usb 2-4: new full-speed USB device number 12 using ohci-pci
[83777.524840] usb 2-4: New USB device found, idVendor=0483, idProduct=5740
[83777.524855] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[83777.524862] usb 2-4: Product: ChibiOS/RT Virtual COM Port
[83777.524868] usb 2-4: Manufacturer: STMicroelectronics
[83777.524873] usb 2-4: SerialNumber: 310
[83777.529350] cdc_acm 2-4:1.0: ttyACM0: USB ACM device
The following is from a minicom terminal:
Code: Select all
AT
AT ?
ch> AT
AT ?
ch> ~x�~~x�~
~x�~~x�~ ?
ch>
ch>
ch>
ch> help
Commands: help exit info systime mem threads test
ch> systime
21651772
ch>
The simple fact of halting it in the debugger may suggest this is a timing issue. In any case it doesn't look like big issue to fix. The rest of the demo, the device and the shell is stable one it is up.