cancel
Showing results for 
Search instead for 
Did you mean: 

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

hgalindo
Associate II

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!

 

1 ACCEPTED SOLUTION

Accepted Solutions
hgalindo
Associate II

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!

View solution in original post

1 REPLY 1
hgalindo
Associate II

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!