cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L1 GPIO Messing with low power

VLe R.1
Associate II

Greetings,

I have an ST32L151CCT6 part with pin PB5 connected to the DE pin on an THVD1400DR RS485 Transciever, my whole system is designed to be low power, and the MCU enters stop mode to achieve that from its side, every pin goes to analog mode. I have meassured the power consumption of my whole system when I take out the transciever and it reaches the expected 40uA.

The problem:

Current rises up to 11mA when I solder the transciever back, even so, I mannaged to find the exact connection with the problem, when I raise the DE Pin on the part breaking the direct connection to PB5 the higher current consumption problem dissapears.

What kind of worked:

Setting the PB5 pin to INPUT makes the current consumption go up to 150uA, wich is way higher than we aimed for.

What I have tried so far:

I tried placing a 470K resistor in series to the trasnciever and the voltage at the DE Pin went to 0.7 volts, wich shouldn't as the datasheet for the transciever states having an 2M pull down resistor. If I go lower then the problem arrises again.

Placing a 470K resistor from PB5 to GND lowers the consumption.

Placing a 68K resistor from PB5 to the DE pin achieves the level required for making it work, but the consumption problem persists.

I measured flowing to the MCU in case there was a leak, but it read 0uA, wich makes me believe there is something inside the MCU triggering and rising its power consumption.

Swaped MCUs, transcievers, same results.

I am using HAL libraries

Any guidance on some info I am missing will be very much appreciated.

VL.

4 REPLIES 4
TDK
Super User

Is the transceiver on in lower power mode? Is it powered? What do you want the DE pin to be at during low power mode?

> I have meassured the power consumption of my whole system when I take out the transciever and it reaches the expected 40uA.

If the current is as expected when the transceiver is not there, that shows the STM32 is doing its part.

If you feel a post has answered your question, please click "Accept as Solution".
Andrew Neil
Super User

As @TDK  said, the fact that it works OK with the STM32 alone suggests that the problem lies with the RS485 transceiver (or the way you're using it).

Therefore, please show your schematic - at least how you have the RS485 Transceiver connected.

How to write your question to maximize your chances to find a solution

 

Have you tried measuring the currents into & around the transceiver?

 

The THVD1400DR  is a TI part - so have you contacted TI for support/recommendations on how to achieve lowest power with their product?

https://www.ti.com/product/THVD1400#support-training

 

Are you correctly disabling both receiver & transmitter to achieve minimum consumption:

Image1.png

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
VLe R.1
Associate II

The transciever is in low power mode, I made many current measurements to know for sure it is doing it. I ended up changing the pin to PA12 for controlling the DE pin and the problem was solved, so it has to be something related to the pin PB15 capabilities as all I did was just changing the pin on cube MX.

Also the connections to the pins of the transciever are just direct connections, the only add on is a pull up resistor on the RS485 data transmit to the MCU when it recieves data from de bus.


@VLe R.1 wrote:

I made many current measurements to know for sure it is doing it. .


Remember that we can't see those measurements, so we need to ask the questions!

 


@VLe R.1 wrote:

I ended up changing the pin to PA12 for controlling the DE pin and the problem was solved, so it has to be something related to the pin PB15 capabilities .


Indeed, there's a lot more stuff on PB15 than on PA12:

Image1.png

Image2.png

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.