Skip to main content
Associate II
December 12, 2023
Solved

Problem using 'NUCLEO-G0B1RE' with USB Host CDC class

I'm trying to communicate with an external device with a USB-C Device interface in CDC Serial class.

I'm following the steps as shown in the video

However, in my debugging, I cannot access the 'userFunction();' function."

void userFunction(void)
{
static uint32_t i = 0;
static uint8_t init_receive = 0;
if(Appli_state == APPLICATION_READY)
{
if(init_receive == 0){
USBH_CDC_Receive(&hUsbHostFS, rx_buffer, 9);
init_receive = 1;
}
if((HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_13) == GPIO_PIN_SET) && i>0XFFFF)
{
USBH_CDC_Transmit (&hUsbHostFS, tx_buffer, 9);
i=0;
}
i++;
}
}

Appli_state is always at '0' (APPLICATION_IDLE).

Can someone help me with this issue?

I'm attaching files that might help with the analysis

Thanks in advance!

 

This topic has been closed for replies.
hgalindoBest answer
Associate II
December 14, 2023

Hello,

I've identified the cause of my issue. The 'X-NUCLEO-SNK1M1' board doesn't support my solution to operate as a host. I made the connections using wires, and now it's connecting normally.

Thank you!

1 reply

hgalindoAuthorBest answer
Associate II
December 14, 2023

Hello,

I've identified the cause of my issue. The 'X-NUCLEO-SNK1M1' board doesn't support my solution to operate as a host. I made the connections using wires, and now it's connecting normally.

Thank you!