2024-02-23 06:23 AM
Hello,
I'm working on a cutom made board controlled by an STM32F303ZET, I figured out that I forgot to pull up D+ for USB communication, even doing it externally keep showing me this error.
I tried to pull up the D+ using 3.3V directly and also by pulling another pin HIGH. How can I resolve this problem ?
Solved! Go to Solution.
2024-02-27 12:31 AM
Hi @EL_HACHIMI ,
A full-speed device uses a pull-up resistor attached to D+ to specify itself as a full-speed device (and to
indicate its speed). The pull-up resistor at the device end is also used by the host or hub to detect the presence of
a device connected to its port. Without a pull-up resistor, the USB assumes that there is nothing connected to the
bus.
On some STM32 microcontrollers, the pull-up resistor is already embedded. Otherwise, the customer needs to
add it. Refer to Embedded pull-up resistor on USB_DP line in table 3 in AN4879 to know if this resistor is integrated on the used STM32 MCU.
For STM32F303ZE, the USB_DP (D+) pin must be pulled up to a voltage in the 3.0 to 3.6 V range with a 1.5 kΩ resistor.
Thank you.
Kaouthar
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-02-23 08:09 AM
Hello @EL_HACHIMI ,
Could you please check your PCB?
I think that section 3 Hardware guidelines for USB implementation in AN4879 can help you.
This section describes the hardware requirements for correct operation of the USB peripheral.
I hope this help you!
Kaouthar
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-02-23 03:26 PM
Some MCUs have the D= pull-up inside MCU.
But I think this message means: "device could not be recognized" (or is not properly answering.
Most of the time it is an issue with "USB Enumeration":
My five cents: your clock config for USB is a bit off, not accurate enough.
2024-02-23 04:32 PM
Thank you for your answers, I found out that the pull-up is done before the "MX_USB_DEVICE_Init()", because this latter is called inside the start of the first RTOS task, so by pulling up D+ to 3.3V just after the fucntion.
And maybe calling the init fucntion before stating tasks will prevent the computer to communicate with the MCU.
Please correct me if Im wrong, and thank you again.
2024-02-23 09:22 PM
I think, you should check if it is really necessary to have a pull-up:
see this thread:
https://community.st.com/t5/stm32-mcus-embedded-software/need-to-pull-up-d-d-with-usb-vcp-when-use-stm32-mcus/td-p/142263
The pull-up on DP (D+) is there when the device indicates itself as a Full Speed (FS) device. If MCU supports just FS (e.g. HS just via external PHY, or HS PHY not integrated into MCU) - MCU might have already this pull-up:
https://community.nxp.com/t5/i-MX-Processors/IMX6SX-USB-how-to-enable-disable-internal-1-5K-pullup-for-USB-D/m-p/994846#:~:text=Speed%20Identification,as%20a%20full%20speed%20device.
What I think: your PC requests the USB Enumeration from the Device (your MCU), but the response (sent by MCU) is incorrect or has bit errors.
As mentioned: the main reason is that USB clock config is not really correct, PCB is bad, external HSE is bad,,,
Your PC gets something from MCU (otherwise, it would be "quiet"), but it does not understand what the MCU has sent. I am sure, it is not the pull-up: check your clocks and PCB traces.
2024-02-27 12:31 AM
Hi @EL_HACHIMI ,
A full-speed device uses a pull-up resistor attached to D+ to specify itself as a full-speed device (and to
indicate its speed). The pull-up resistor at the device end is also used by the host or hub to detect the presence of
a device connected to its port. Without a pull-up resistor, the USB assumes that there is nothing connected to the
bus.
On some STM32 microcontrollers, the pull-up resistor is already embedded. Otherwise, the customer needs to
add it. Refer to Embedded pull-up resistor on USB_DP line in table 3 in AN4879 to know if this resistor is integrated on the used STM32 MCU.
For STM32F303ZE, the USB_DP (D+) pin must be pulled up to a voltage in the 3.0 to 3.6 V range with a 1.5 kΩ resistor.
Thank you.
Kaouthar
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-03-12 05:06 AM
Hello @EL_HACHIMI ,
Any update about this issue? May be this FAQ USB device not recognized can help you.
If you need a further assistance, please do not hesitate to update the post.
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.
Thank you.
Kaouthar
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.