2024-08-14 03:53 AM
Hi, I want to get log using Type-c, and using freertos to run all the tasks.
setting:
MCU STM32L4A6VG
STM32CubeIDE 1.12.0
STM32CubeMX 6.8.0
tera term 4.106
when i insert Type-c, device manager return the unknown usb.
I try some methods:
1. put MX_USB_DEVICE_Init() before MX_FREERTOS_Init() -->unknown usb error 43
2. put MX_USB_DEVICE_Init() in task -->unknown usb error 43
3. increase MINIMAL_STACK_SIZE to 1024 -->unknown usb error 43 (ref: https://community.st.com/t5/stm32cubemx-mcus/nucleo-h723zg-usb-cdc-communication-not-working-when-using/m-p/662907 )
4. change clock output -->unknown usb error 43(ref: https://community.st.com/t5/stm32cubemx-mcus/unknown-usb-device-on-stm32f429zi-device/m-p/75508 )
5. i dont think i need interrupt in usb, but this ref make me confused (ref:https://community.st.com/t5/stm32-mcus-embedded-software/stm32g0b1-usb-device-not-recognized-in-windows-10/m-p/135939 )
It will be very helpful if any one tell me something. Thank you.
Solved! Go to Solution.
2024-08-22 08:22 AM
Hi @alyssa
You need to ensure that the D+ and D- lines in design are equal in length and respect differential pair routing guidelines as referenced in AN4879 is crucial for maintaining signal integrity and achieving reliable USB communication. In your screenshot 102632 these rules are not respected. D+ and D- lines should be of equal length and consistent spacing.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-08-14 04:54 AM
Can you include your code?
You definitely need USB interrupts enabled.
2024-08-14 08:13 AM
Hi @alyssa
Based on these attachments, there might be missing or incorrect device descriptors in your configuration. You need to check them.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-08-15 02:50 AM
Hi,
thank you for you reply.
If you say the interrupt in NVIC settings. I have set it before (sorry make you confused), but still get unknown usb error 43.
i attach the main.c below. (for just testing usb, i disable the FreeRTOS)
but i dont think this is a FW problem.
because when i use Full chip erase by STM32CubeProgrammer v2.13.0, the PC still tell me the unknown usb error 43.
i think without the FW, PC can recognize STM32 BOOTLOADER when insert usb.
2024-08-15 02:56 AM
2024-08-15 05:12 AM
> i think without the FW, PC can recognize STM32 BOOTLOADER when insert usb.
This is true. So perhaps there is a hardware error. Can you show your schematic?
Do you have a Nucleo or other known good ST board you can test this one?
2024-08-16 09:40 AM
As suggested @TDK , please share your schematics or try to reproduce on reference board so that we might help you investigate further. Try to update all your SW tools.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-08-20 07:24 PM - edited 2024-08-20 07:30 PM
2024-08-22 08:22 AM
Hi @alyssa
You need to ensure that the D+ and D- lines in design are equal in length and respect differential pair routing guidelines as referenced in AN4879 is crucial for maintaining signal integrity and achieving reliable USB communication. In your screenshot 102632 these rules are not respected. D+ and D- lines should be of equal length and consistent spacing.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-11-07 11:42 PM
Hi, sorry for delay.
yes, this is hardware problem.
now I can get log by Type-c. Thank you.