cancel
Showing results for 
Search instead for 
Did you mean: 

Shutting down USB device FS to reduce power consumption

bm
Associate II
Posted on November 25, 2016 at 18:07

Due to power saving I want to disable the USB stack on the fly.

For comparison: If I do not enable the USB stack at all (e.g. by not invoking MX_USB_DEVICE_Init()) everything is fine. If I do and decide to shut it down later during runtime via

void
MX_USB_DEVICE_DeInit(
void
)
{
USBD_DeInit(&hUsbDeviceFS);
}

I can not get the same power consumption results compared to the first approach where I do not enable the USB stack at all. So there must be something that consumes still power. Any ideas what I am missing? I am working with an F411 and the HALV1.3.2. Any help is appreciated!
4 REPLIES 4
Posted on November 25, 2016 at 20:22

Maybe it's easier and faster to reset the USB through respective bit in RCC_AHBxRSTR...?

JW
slimen
Senior
Posted on November 28, 2016 at 12:31

Hello,

I recommend you using the last version of STM32CubeF4 firmware (I think available version of HAL is V1.5.2.) and CubeMx tool v4.17.0 .

Regards

bm
Associate II
Posted on November 28, 2016 at 14:54

Sounds like a good approach I'll give it a try.

bm
Associate II
Posted on November 28, 2016 at 15:03

yes, this would be the most obvious choice but since we had such bad experience we the HAL and just established a somehow stable version of our sw we are very cautious considering changes of the HAL.

But yeah it might be the time to actually look into this...