2023-08-04 01:54 AM
I designed a PCB using STM32L476RG and MPU6050. I used USB interface in the board. When I am connecting the board to my laptop the board is getting the power but laptop is unable to detect the board. Should I install any drivers in my laptop to make that work or is there anything else. Please help me with this.
2023-08-04 05:51 AM
You need code on the processor which initializes USB and handles communication. Did you do that?
Dev boards have an ST-Link between the target MCU and the PC used for programming and communication. If you connect an MCU directly, this interface is not there.
2023-08-04 09:33 AM
> You need code on the processor which initializes USB and handles communication.
Some of the STM32 have built-in USB-DFU bootloader. Refer to AN2606 and any other document linked from there.
JW
2023-08-04 09:56 AM - edited 2023-08-04 09:56 AM
Would appear as an "STM32 BOOT" device in DFU mode if reset with BOOT0 pulled HIGH, this would allow programming via STM32 Cube Programmer.
A device with no code running on it won't be any type of USB Device. You'd need a application loaded and running.
STM32Cube_FW_L4_V1.17.2\Projects\32L476GDISCOVERY\Applications\USB_Device\DFU_Standalone
2023-08-04 10:51 AM
Thank you for the response I did program the PCB using STLINK - V3MINIE. I can see in the console of STM32CubeIDE the target device name and it says download is successful when running the code. But I cannot see it in the COM port section of device manager. What might be the possible reason for this, How do I rectify that?
2023-08-04 11:28 AM
Is the code you're uploading a USB CDC Device?
If it's not working, expect to have to debug it.
2023-08-04 10:29 PM
Yeah I have included usb cdc. Do you think something is wrong with the code?
2023-08-05 05:24 AM
> But I cannot see it in the COM port section of device manager.
Do you see it elsewhere?
After programming with code, did you change the BOOT0 pin setting (or any other setting to avoid repeated bootloader entry) and did you remove and reconnect power?
JW
2023-08-05 05:38 AM
Well it's either the software or the hardware, debug it as such. Check the circuits, see what IS happening.
You can check the USB connection side by using the Boot mode, with BOOT0=HIGH, and with a board with a working clock (see AN2606), you should get Windows ding-dong sounds as you present and remove the device, and you should get an "STM32 BOOT" type device and driver load, should be visible / usable in STM32 Cube Programmer as a "USB" device.
Similarly with BOOT0=LOW your USB CDC should attach / remove in Windows, is that happening? If not then make sure the board and code is actually starting, debug it, step code or output diagnostic / telemetry via a serial output.