cancel
Showing results for 
Search instead for 
Did you mean: 

USBD_CDC_Init BUG ?

Marco1
Associate II
Posted on March 16, 2018 at 15:41

Hi, 

i generated a little project with STMCUBE (Version 4.25.0 and packages 1.21.0)  for STM32F415 with FreeRTOS  and only CDC inteface, but not work.

During the INIT on comand 'Set configuration = 1' i receive a error from this function >

USBD_CDC_Init< 

and  exactly on

USBD_malloc(sizeof (USBD_CDC_HandleTypeDef)); 

 i got ever NULL !

Some fix ? Where is the problem ?

static uint8_t USBD_CDC_Init (USBD_HandleTypeDef *pdev, uint8_t cfgidx)

{

.

.

.

pdev->pClassData = USBD_malloc(sizeof (USBD_CDC_HandleTypeDef));

if(pdev->pClassData == NULL)

{

   ret = 1;

}

else

......

}

Sorry for my english

0 REPLIES 0