Skip to main content
Explorer
December 15, 2023
Question

STM32F446 failed to send SETUP transfer using USBH library

  • December 15, 2023
  • 3 replies
  • 1211 views

my platform is STM32F446, it play as a USB host at full speed, and the pins are PB14 PB15.

I use ST USBH library to implement a USB AOA class.
But I found that everytime when the MCU try to send a Setup transfer and DATA0 transaction, the DATA0 is corrupted.
from logic analyzer we seen below, the DATA0 bit number is wrong.

newbeea_0-1702621693868.png
further more, there are 20+ bits 170us later.

newbeea_1-1702623720648.png

if we are able to link them together, its an unbroken transection.

newbeea_2-1702623853656.jpeg

 

for this season, program USBH_HandleControl goto CTRL_ERROR, and finally make a reset. And this happen over and over.

Anyone can help me? it border me a lot. Thanks very much!

    This topic has been closed for replies.

    3 replies

    newbeeaAuthor
    Explorer
    December 16, 2023

    :)

    November 29, 2024

    Hello newbeea

    Did you solve your problem? Just I faced the same one.

    December 4, 2024

    I've solved my trouble. 

    I use RTOS and enter sleep mode in Idle proccess using WFI instruction. But USB OTG HS not compartible with sleep modes unless it is in suspended state. See 35.8 Reference Manual.

    Super User
    November 29, 2024

    Errors on data level can be caused by problems at electrical level. Try to scope the USB wires. Try to get professional USB.org test equipment and pass PHY tests (the eye diagram and all that).