Skip to main content
Chuev.Vladimir
Associate III
November 8, 2017
Question

USB Error while transmitting UART

  • November 8, 2017
  • 1 reply
  • 769 views
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
This topic has been closed for replies.

1 reply

waclawek.jan
Super User
November 8, 2017
Posted on November 08, 2017 at 18:03

Tx on PA9 and VBUS sensing in USB on?

JW

Chuev.Vladimir
Associate III
November 9, 2017
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?
waclawek.jan
Super User
November 9, 2017
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