Skip to main content
hjuns
Associate II
March 15, 2019
Question

Cubemx USB BUG

  • March 15, 2019
  • 2 replies
  • 1088 views

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()

This topic has been closed for replies.

2 replies

Saeed Sh
Associate
March 26, 2019

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
March 26, 2019

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