mcauser / MCUDEV_DEVEBOX_F407VGT6

MicroPython board definition for the MCUDev DevEBox STM32F407VGT6 board
MIT License
68 stars 32 forks source link

Not micropython related: no ttyACM port when using Arduino framework #1

Open stevewells20 opened 4 years ago

stevewells20 commented 4 years ago

This is not especially related to this repo, but I'm a bit at a loss and this repo has the most complete information I've seen for this specific dev board.

Using the micropython compile and upload works flawlessly, and Linux immediately recognizes the board and adds /dev/ttyACM0 port. However, when compiling with either the Arduino and CubeIDE frameworks, no port is added for the board, it is not listed in lsusb, and dmesg doesn't show any entry for it. Is there something special that micropython is doing to activate the serial port on the board so that it is observable to Linux?

mcauser commented 4 years ago

When you flash MicroPython to the board, it's creating a filesystem and mounting it as a USB storage device and enabling the VCP (Virtual COM Port) interface. See usb_mode() in boot.py

I am not familiar with the Arduino STM32 setup. Are there any other F407 boards which support setting USB modes (CDC/VCP) which you could pinch code from?

stevewells20 commented 4 years ago

Ah I see. Thanks for pointing out usb_mode(), sounds like that is a good starting place. I'll do some investigating when I have time, I'm sure there is some similar F407 USB code floating around. Haven't had too much experience with STM32 hardware before, so I didn't have a good starting place to work from. Thanks for the help!