cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F207 Nucleo-144 USB Device Custom Class

guenniause
Associate II
Posted on November 07, 2016 at 09:09

Hi,

we use a USB custom class of our own.

For STM32 devices we changed the CDC files (of the USB device library) according our requirements. The CDC files were based on the standard peripheral library.

This works fine.

Now we want to use STM32Cube. Therefore I changed the CDC files, according the changes in the files of the older version.

But now it doesn’t work.

There is no problem with enumeration. But when I send data from host to device, the receiving of data is not correctly.

The interrupt USB_OTG_GINTSTS_RXFLVL is asserted. Then the data is read out of the FIFO within the function HAL_PCD_IRQHandler in stm32f2xx_hal_pcd.c.

Then there must be asserted the interrupt

USB_OTG_DOEPINT_XFRC, I think.

But this never occurs. So the function HAL_PCD_DataOutStageCallback is never called

.

The CDC class works on the same device. So I think it’s no problem of hardware.

Any ideas?

Thanks, Guenter

1 REPLY 1
Amel NASRI
ST Employee
Posted on November 16, 2016 at 13:42

Hi guenni,

I suggest you check the example STM32Cube_FW_F2_V1.4.0\Projects\STM322xG_EVAL\Applications\USB_Device\CDC_Standalone. It is usable as is with STM32F2 evaluation board. But you may update it commenting all board specific features to be suitable for the Nucleo.

Then, you can compare the code in this example with your own one.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.