Skip to main content
Visitor II
May 27, 2020
Question

USB Issue on H743II

  • May 27, 2020
  • 5 replies
  • 1669 views

Hi,

I have two STM32H743II MCUs, one of them is USB device and the other one is the USB host, did it sing the cube.

then added to the host code the USBH_CDC_ReceiveCallback function.

and added the  HAL_PWREx_EnableUSBVoltageDetector(); function after the USBH_Start function.

I am running the two boards, pluges the USB in between and tries to send data from one to another but it's not working.

best regards

JK

    This topic has been closed for replies.

    5 replies

    Visitor II
    May 27, 2020

    If the two boards are only connected to each other through USB, then save yourself a lot of headache, and configure the USB data pins as UART ports. Swap TX/RX in the UART for one of the controllers (see USART_CR2_SWAP).

    Graduate II
    May 27, 2020

    Not working is overly broad, you'll likely need to debug this by adding instrumentation, trying independently against a PC.

    Check the signals electrically, use a USB analyzer.​

    JKhalAuthor
    Visitor II
    June 3, 2020

    Hi,

    Thanks for your reply.

    when I plug in the USB device to the USB host, the host detect it and the enters the case HOST_DEV_ATTACHED, after that the host tries to perform the function USBH_GetDescriptor again and again but the  condition if(phost->RequestState == CMD_SEND) is never true.

    I am not a USB stack expert :(.

    Please help me to figure it out.

    BR

    JK

    JKhalAuthor
    Visitor II
    June 8, 2020

    Hi,

    Thanks for your replyies.

    when I plug in the USB device to the USB host, the host detect it and the enters the case HOST_DEV_ATTACHED, after that the host tries to perform the function USBH_GetDescriptor again and again but the condition if(phost->RequestState == CMD_SEND) is never true.

    I am not a USB stack expert :(.

    Please help me to figure it out.

    BR

    JK

    JKhalAuthor
    Visitor II
    June 21, 2020

    Hi,

    I managed to send messages from the USB host to the USB device.

    But yet can't send anything from the USB device to the USB host.

    when I need to do so I use the function uint8_t CDC_Transmit_HS(uint8_t* Buf, uint16_t Len).

    is that correct ?

    Please help me solve this issue.

    Best Regards

    JK

    Visitor II
    August 10, 2020

    Hi JKhal,

    I'm facing the same problem, did you succeed solving it?

    Regards.

    Hubert