cancel
Showing results for 
Search instead for 
Did you mean: 

Cubemx USB BUG

hjuns
Associate III

Cubemx v5.1.0 , STMF7 v.1.15.0 ,USB CDC , device only, usb fs

USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status)

static void SystemClockConfig_Resume(void)

is not declaration.

AND

hpcd->Init.speed = USB_OTG_SPEED_FULL

void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd)

{

USBD_SpeedTypeDef speed = USBD_SPEED_FULL;

if ( hpcd->Init.speed == PCD_SPEED_HIGH)

{

speed = USBD_SPEED_HIGH;

}

else if ( hpcd->Init.speed == PCD_SPEED_FULL)

{

speed = USBD_SPEED_FULL;

}

else

{

Error_Handler();

}

/* Set Speed. */

USBD_LL_SetSpeed((USBD_HandleTypeDef*)hpcd->pData, speed);

/* Reset Device. */

USBD_LL_Reset((USBD_HandleTypeDef*)hpcd->pData);

}

USB_OTG_SPEED_FULL is 3

PCD_SPEED_HIGH is 0

PCD_SPEED_FULL is 1

it always make go to Error_Handler()

2 REPLIES 2
Saeed Sh
Associate II

I have the same problem since I've updated to the latest release. Is there anyone working on this?

Any suggestion on the solution?

Saeed Sh
Associate II

I commented out Error_Handler() and it seems that the problem is solved for now.