cancel
Showing results for 
Search instead for 
Did you mean: 

Basic data transfer with USB CDC (FS) between PC and the Nucleo-F411RE board does not work. Please help me!

MScha.1
Associate II

I would like to send data from the Nucleo Board F401RE or F411RE to the PC via the USB interface. The data should be transmitted via a virtual COM port (CDC protocol) with Full Speed (FS). Unfortunately this does not work! For testing I use also a Nucleo-L476RG Board. With the Nucleo-L476RG board the data transfer works but when I try to implement it on the Nucleo-F401RE or -F411RE Board I cannot connect to the COM port. The port is added in Windows but it cannot be opened. What do I have to change to make it work on the Nucleo-F4X1RE Boards? It must run on the F4 chip because the program should run on a developer board where the STM32F401CEU6 (or a STM32F411CEU6) chip is mounted.

The PC runs with Windows 10.

The used tool chain is:

CubeMX 5.5.0 and SW4STM32 Version Neon.3 Release 4.6.3.

USB is connected as follows:

GND connected to Nucleo

VCC (+5V) not connected

D+ connected to PA12

D- connected to PA11

The following is set in CubeMX:

Connectivity:

- USB_OTG_FS / Device_Only

- "Activate_SOF" and "Activate_VBUS" are inactive.

- Middleware: USB_Device / Communication Device Class (Virtual Port Com)

In the main.c programme the following additions have been made:

1)

/* USER CODE BEGIN 2 */

 HAL_Delay(1000);

 uint8_t buffer[] = "Hello, world!\r\n";

2)

 /* USER CODE BEGIN WHILE */

 while (1)

 {

    CDC_Transmit_FS(buffer, sizeof(buffer));

    HAL_Delay(1000);

    HAL_GPIO_TogglePin(LD2_GPIO_Port,LD2_Pin);

1 REPLY 1
MScha.1
Associate II

In the AN4879 Page 3 it is noted that the F4X1 has the interface "C" and the L4X6 chip has the interface "B". This is the only difference I could discover. With the L4X6 chip it had worked (interface "B"). What is different between "B" and "C" in FS mode?

B: USB 2.0 OTG FS, that is, USB 2.0 FS device/host/OTG controller with on-chip FS PHY

C: USB 2.0 OTG HS, that is, USB 2.0 FS/HS device/host/OTG controller, integrating the transceivers for fullspeed

operation, and featuring an ULPI for high-speed operation: an external PHY device connected to the

ULPI is required.