2023-12-12 05:04 AM
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!
Solved! Go to Solution.
2023-12-14 09:50 AM
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!
2023-12-14 09:50 AM
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!