cancel
Showing results for 
Search instead for 
Did you mean: 

USB Error while transmitting UART

Chuev.Vladimir
Associate III
Posted on November 08, 2017 at 12:38

I'm using STM32F401CBUX

I have a USB HID that works well

But when I call HAL_UART_Transmit_IT/HAL_UART_Transmit_DMA/HAL_UART_Transmit, there's a USB cliff on the host side

What could be the matter? I don't understand anything

#usb-hid #custom-hid #uart
4 REPLIES 4
Posted on November 08, 2017 at 18:03

Tx on PA9 and VBUS sensing in USB on?

JW

Posted on November 09, 2017 at 08:56

Yes.

Can I fix the problem without changing the board?

Why is this happening? Will the same problem be with the usual GPIO?
Posted on November 09, 2017 at 09:53

From RM:

The VBUS pin can be freed by disabling the V BUS sensing option. This is done by setting the

NOVBUSSENS bit in the OTG_FS_GCCFG register. In this case the V BUS is considered

internally to be always at V BUS valid level (5 V).

There probably will be a ♯ define or a configuration setting in the library you are using to achieve this. Please report back with your findings.

JW

Posted on November 13, 2017 at 12:14

Thank you! This helped