cancel
Showing results for 
Search instead for 
Did you mean: 

USB CDC Port Not Shown In Device Manager(MCU STM32F!103RET6)

Smit Italiya
Associate III

Hello Everyone,

Right now i am facing the issue on detection USB.I am attaching snap shots of the my USB configuration.

USB port not shown after powering up the board. i am doing some basic thing like on receiving via USB in RX interrupt function of USB i set one flag that will used in main function for further process.

Help Me if anyone knows the issue, i stuck here since 2 days.

STMCubeIDE Version:- 1.13.2

MCU:- STM32F103RET6

Debugger:- Jlink(4000Khz)

USB DP:- PA12

USB DM :-PA11

Internal Power Supply used which is given to MCU and other board peripheral.

 

 

 

Screenshot 2023-11-07 120759.pngScreenshot 2023-11-07 120821.pngScreenshot 2023-11-07 120821.pngScreenshot 2023-11-07 114158.png

Screenshot 2023-11-07 114440.pngScreenshot 2023-11-07 114453.pngScreenshot 2023-11-07 114503.pngScreenshot 2023-11-07 114523.pngScreenshot 2023-11-07 114543.png

1 ACCEPTED SOLUTION

Accepted Solutions

If there is a need to increase stack and heap size, make them at least 1024 bytes or more. Pullup resistor is required only with F1 series. The built-in USB bootloader is not present in F103, so some of the information you provide is false or at least incomplete.

View solution in original post

24 REPLIES 24
gbm
Lead II

Check the USB cable and the operation/frequency of quartz oscillator. Some versions of USB stack may require increased stack or heap size - set both to 2048 just in case. And, as I wrote many times in the past, calling USB Transmit from the main loop will sooner or later hang the USB stack, but it's another story - deal with it after the device is detected.

Hi gbm,

thank you for response ,As you suggest me i check the oscillator frequency and it is 16mhz. i will let you know after changing heap and stack size to 2048.

any thing else you know about this?

No detection despite of changing the buffer size to 2048 Bytes

gbm
Lead II

So maybe you should use The Force... I mean the debugger. Comment out your ecu-related calls, leaving only USB initialization, then check what happens.

My wild guess: continuous ADC conversion causes continuous ADC interrupts consuming all the CPU time with no time left for any other processing.

Piranha
Chief II

Thanks gbm ,i tried by creating test project in which i run USB only and find the same as before. other then that i have same project with stm32f0 series there USB works fine.is there any issue with the stm32 SDK?

can you explain me more about what your point of view because i am not able to understand properly i am slightly new to USB

Increase the stack and heap size in CubeMX project settings. The RX and TX buffer size settings in CubeMX are pure nonsense - only 64 bytes of RX buffer are ever used and the TX buffer is not used at all.

AScha.3
Principal III

is there a 1k5 pullup on usb DP ?  ( otherwise no enumeration starting...)

If you feel a post has answered your question, please click "Accept as Solution".