AnsweredAssumed Answered

Cube Middleware for USB CDC fails to create port on STM32F4x9I-EVAL board

Question asked by newbill.jon on Jul 20, 2016
Latest reply on Aug 4, 2016 by newbill.jon
I am using STM32CubeMX to generate code to create a USB CDC device on the STM32F4x9I-EVAL MB1045 Rev B board which has a STM32F429VGT6 microcontroller. 
For testing I connect the OTG FS1 USB connector on the STM32F4x9I-EVAL board to a Raspberry Pi acting as the host Linux system. 
When I run the Cube generated code (see attached project) I do not see a virtual TTY appear on the Raspberry Pi system.

I have run the same test using Cube generated code for the STM32F4-DISCOVERY board with an STM32F407 Microcontroller and with that board I do see a /dev/ttyACM0 virtual TTY appear.

With the failing test on the STM32F4x9I-EVAL board I have tried both the OTG FS1 and the OTG FS2 connectors.  I do see the associated LD7 and LD9 LED's turn green when I connect the micro USB cable.  I am wondering if there is some board configuration or jumper that I have missed?  Note that I am running the CUBE generated code without modification except for testing return code from the USB Init routines in MX_USB_DEVICE_Init().  There are no errors returned by the generated code for the STM32F4x9I-EVAL board.  The demo is being compiled and run using Keil uVision V5.20.0.0

I added a counter in the OTG_FS_IRQ handler and compared the difference between the failing F429 board and the working F407 board

When the USB cable is connected from the Linux system to the F407 board it generates about 97 interrupts before creating the virtual TTY port.
When the USB cable is disconnected it generates 1 interrupt and the virtual TTY is deleted.

When the USB cable is connected from the Linux system to the OTG FS 1 connector on the F429 board it generates about 1140 interrupts and no virtual TTY port is created.
When the USB cable is disconnected from the OTG FS 1 port then one interrupt is generated

When USB cable is connected or disconnected from Linux to the OTG FS 2 connector on F429 board no interrupts are generated.

From this information I am inclined to conclude that the F429 board is recognizing the Linux host but failing to establish the connection after numerous retries.

The attached ZIP file contains the full project and also the Cube IOC file.  Looking for solution to getting CDC working on STM32F4x9I-EVAL.

Attachments

Outcomes