cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-H563ZI as USB host?

algernon77
Associate II

Hello,

I would like to know if Nucleo-H563ZI board could be used as a USB host, using the user USB (CN13). I'm asking because I'm a bit confused, honestly - I've only found examples where it's being used as a device and the board manual seems to mention only as device and sink only for the CN13 connector. OTOH, in CubeIDE, after starting a new project based on this board, the USB and USBX can be configured as host, without any restriction. And, if it's possible, should UCPD1 and USBPD be enabled along with USB and USBX, or it's enough to call HAL_PWREx_EnableVddUSB at the end of HAL_HCD_MspInit?

 

Basically, what I want to implement is reading VID, PID and SN from a USB storage device plugged in CN13 and printing them over USART3.

Thanks!

10 REPLIES 10

Yes, just enable in ioc , set correct core clk. Otherwise no function..

+

for printf working , just put in main the io_putchar:

 

/* USER CODE BEGIN 4 */

int __io_putchar(int ch)
{
    ITM_SendChar(ch);
    return (ch);
}
/* USER CODE END 4 */

 

 + enable in ioc in usb ,,,the debug messages. (maybe is enabled anyway.)

+

set some printf in your program, at start etc. to see it working;

but every printf("  tatatt \r\n ")  r/n at end, otherwise is not sent !

If you feel a post has answered your question, please click "Accept as Solution".