2020-05-27 03:10 AM
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
2020-05-27 04:12 AM
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).
2020-05-27 04:21 AM
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.
2020-06-03 03:24 AM
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
2020-06-07 11:22 PM
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
2020-06-21 06:52 AM
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
2020-08-10 12:21 AM
Hi JKhal,
I'm facing the same problem, did you succeed solving it?
Regards.
Hubert