2016-05-20 07:47 AM
I am porting an existing design from an F107 to a L4 micro in the hopes that I can push sleep current below 50uA.
Currently I have only one barrier to achieving this low power: the USB device peripheral. No matter What I do, once the USB has been initialised, I can't get stop1 current below ~200uA. I have tried calling USBD_DeInit and USBD_Stop before stopping, but this only got me down to the 200uA. I have seen some forum posts (/c8dfa70e
) related to the F4 saying that VBus sensing can account for this, but I have checked and the GCCFG register is completely reset after DeInit. Does anyone have any ideas? I an using the latest Cube L4 HAL libraries, V1.4. #pull-up #stm32l4 #stm32l4 #usb #usb #power #stm32cube #pull-down2017-09-22 12:50 PM
I found that when USB is in low power the DM pin floats and that caused the around 200uA power draw. Pulling DM down removes the draw. Even a 1M pull down helps.
I'm trying to find a way to handle this in software though. Any ideas are welcome
2017-09-26 12:44 AM
Hi Peter,
I found the same problem and I applied the solution that you wrote.
Anyway, I did do some investigations and I found that the extra current draw is due to the TVS USB protection ( a bridge diode plus a zener into a the same chip); removing the protection device all currents are perfect.
In my application I have a resistor divider of about 2MOHM placed on VDD pin of the protection device that I use to detect USB DOWNSTREAM attach/detach; I notice that also removing the divider the extracurrent go down, but is sufficient to put an oscilloscope probe on VDD (10MOHM) tha the current increase around 30 .. 40uA ! I thought it was a ghost.
I wrote to the manufacturer of TVS protection explaining that for me there is a parasitic PNP composed by the diode placed on the DP line (1.5KOHM pullup on 3V3) and the zener with a hfe less or more equal to 200.
The manufacturer answered me that I used a wrong p/n in which the VDD can not be float.
I tried another p/n that has an extra diode placed from kathode of zener and VDD pin, but I did not notice any significant improvements (I think because the extra diode isn't ideal).
At the end of my analysis my conclusion is that the higher current is not due to USB DM line float (from the point of view of the microcontroller) and the only workaround is, like you wrote, to place an hi resistor value on DM line.
2017-09-27 01:24 PM
Which protection device are you using? (so I can avoid it )
2017-09-28 02:02 AM
Hi Peter, the first device (no float VDD pin) has p/n WE 824011; the second with declared VDD pin float capability has p/n WE 824014 (it has 4 I/O channels but I use only 2). The VDD pin capability isn't declared in datasheets but in ANP002 of the manufacturer. The difference is visible in datasheet schematics; the device with declared VDD pin float capability has a diode placed from Kathode of zener and the VDD pin.
Anyway, my opinion is that verifications and measurements are very important to qualifing this kind of devices because the simple analysis of internal circuit is not enought, especially in very low power designs (note that both devices mentioned have a declared maximum reverse current of the zener equal to 1uA at 5V and it is true if VDD pin is really floating or connected to a 5V). It is clear that the issue that I noticed is related to the internal component design at die level (isn'possible to realize a PNP bjt with two discrete diodes).
Have you tried to remove the protection device and did you redo the measurements?
2017-09-28 05:35 AM
I did not have the esd protection chip on this board at all.
What fixed it for me was enabling the battery charge detection circuit.
Se my answer on stack overflow.
https://electronics.stackexchange.com/questions/330252/how-to-debug-stm32l433-current-leakage
2024-02-13 02:18 AM
Hello,
I am facing similar issues .
Is the TVS USB protection Device a USBLC6-2SC6?
That is the one I use, and I also have the VDD floating, and when I heat it a little, the current goes up with several hundred uA's.
When I connect the VDD of the TVS protection device to +3.6Volts, nothing happens
2024-02-21 08:13 AM
I have a related problem.
I can fix it in hardware though..
The problem is that the USB_DM is floating in STOP1MODE, even after I executed USBD_LL_Suspend().
The whole board with >10 chips on it is consuming about 27 uA, when the microcontroller is in Stop1mode.
But the USB_DM is so extremely sensitive, that, when I point to it using my finger ( not even touching it, but getting close) the current consumption goes up to several hundred uAmps.
As a fix I used a 1 MOhm resistor to ground. works perfectly. The current consumtion is stable now. :)
But I was wondering if I could fix it in firmware also.
So I used LL_GPIO_SetPinPull(GPIOA, GPIO_PIN_11, LL_GPIO_PULL_DOWN);//USB_DM
But it doesn't work.
to test my code I pulled it high, and verified on a scope: it is NOT working.
Perhaps I nee to re-initialize the GPIO Pins PA11 & PA12. I did, but than the device won't wake from sleep anymore.
I think the resistor is the best fix.
Or has anyone a better idea?
I verified the USB is working properly with the 1M Ohm connected to it.