2023-11-06 11:00 PM - edited 2023-11-07 12:18 AM
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.
Solved! Go to Solution.
2023-11-09 03:58 AM
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.
2023-11-07 04:11 AM - edited 2023-11-07 04:12 AM
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.
2023-11-07 06:23 AM - edited 2023-11-07 06:25 AM
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?
2023-11-07 06:29 AM
No detection despite of changing the buffer size to 2048 Bytes
2023-11-08 08:53 AM - edited 2023-11-08 08:56 AM
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.
2023-11-08
09:37 AM
- last edited on
2023-11-09
12:57 AM
by
Lina_DABASINSKA
One cannot just call functions like CDC_Transmit_FS() from this USB stack:
2023-11-08 10:16 PM
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?
2023-11-08 10:40 PM
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
2023-11-09 12:03 AM
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.
2023-11-09 12:18 AM
is there a 1k5 pullup on usb DP ? ( otherwise no enumeration starting...)