SmartCAMPUSZCU / KETCube-fw

KETCube firmware
Other
1 stars 1 forks source link

USB NOT Operational #25

Closed belohoub closed 5 years ago

belohoub commented 5 years ago

After sample code for USB FS generated by STM32Cube is downloaded into KETCube, USB device is not enumerated in PC.

belohoub commented 5 years ago

STM presentation (slide 54) states, that minimal Heap Size for USB Middleware should be to 0x800:

https://blog.brichacek.net/wp-content/uploads/2015/10/STM32F4-and-USB.pdf

belohoub commented 5 years ago

In UM2115, in Chapter 8.10 (USB FS), page 17:

The B-L072Z-LRWAN1 board supports USB FS 2.0 communication via a USB Micro-B connector. VBUS is powered by another USB host when B-L072Z-LRWAN1 board works as a USB device.

Note: When the B-L072Z-LRWAN1 board is powered by an external power supply through USB FS connector (CN11), in device mode, do not use a PC as power source if the current consumption is greater than 100mA, otherwise the PC can be damaged.

And in Chapter 8.3 page 14:

The Discovery kit can be powered from the ST-LINK USB connector, but only the ST-LINK circuit has the power before USB enumeration, because the host PC only provides 100 mA to the board at that time. During the USB enumeration, the Discovery kit requires 300 mA power from the host PC.

USB on B-L072Z-LRWAN1 works if B-L072Z-LRWAN1's both micro USBs (CN7 and CN11) are connected to PC -> enough power is delivered to Murata Type ABZ.

belohoub commented 5 years ago

The KETCube/B-L072Z-LRWAN1 schematic differences:

KETCube does not work now. KETCube's USB is not working even when the external power supply is connected directly to 3V3 PIN.

belohoub commented 5 years ago

USB is operational when jumper J3 is OPEN. 100mA was enough to get USB work. B-L072Z-LRWAN1 requires 300mA. Why?

belohoub commented 5 years ago

Ugh, 300 mA is related to STLINK!

belohoub commented 5 years ago

Notes related to; USB configuration were added to KETCube datasheet: https://github.com/SmartCAMPUSZCU/KETCube-docs/commit/c5624dee18b74146b04d3fb4e968a612b8ae7c74