mcauser / WEACT_F411CEU6

MicroPython board definition for the WeAct STM32F411CEU6 board
121 stars 33 forks source link

STM Virtual Serial Port USB Issue #1

Open gersch07 opened 4 years ago

gersch07 commented 4 years ago

Dear all,

I followed all the steps in this guide and could access the REPL prompt a few times. However, most times the board is not properly detected (showing "Error 43" in Windows device manager). This could be related to a USB clock issue and people from "STM32duino" seem to have fixed it here by setting the clock to 96 instead of 100 MHz (USB needs 48 MHz): https://github.com/stm32duino/Arduino_Core_STM32/pull/905/commits/a5baee35f49adc1c76111dd3a3bc1c60a2ca74ec Would it be possible to include this fix here? Unfortunately I have no idea how to do that...

mcauser commented 4 years ago

Possible fix in: https://github.com/mcauser/WEACT_F411CEU6/commit/40061c9ed43dc7fb5e0363f808843ce2cda7e0e1

Clock was already set to 96 MHz and USB 48 MHz. This increases the flash latency from 2 to 3.

I don't have a Windows machine to test this on. Would you mind taking a look?

SuperThunder commented 4 years ago

I've been using micropython on the board with Windows for a few days and it's rock solid stable. Always detected by USB and no amomalous behaviour at all.

koendv commented 4 years ago

FWIW, I've got the following under linux, using micropython from the git:

$ uname -a
Linux raspberrypi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux
$ dmesg
...

[55738.416138] usb 1-1.3: new full-speed USB device number 40 using xhci_hcd
[55738.516388] usb 1-1.3: device descriptor read/64, error -32
[55738.736385] usb 1-1.3: device descriptor read/64, error -32
[55738.956194] usb 1-1.3: new full-speed USB device number 41 using xhci_hcd
[55739.056393] usb 1-1.3: device descriptor read/64, error -32
[55739.276418] usb 1-1.3: device descriptor read/64, error -32
[55739.396836] usb 1-1-port3: attempt power cycle
[55740.056200] usb 1-1.3: new full-speed USB device number 42 using xhci_hcd
[55740.056426] usb 1-1.3: Device not responding to setup address.
[55740.276353] usb 1-1.3: Device not responding to setup address.