EEVblog Electronics Community Forum
Electronics => Microcontrollers => Topic started by: Matt Coates on November 28, 2024, 01:14:40 pm
-
I'm having an issue with a design that uses the MAX31855 thermocouple sensor. The IC is setup as per the attached, and the SPI lines are connected directly to PA4, PA5, PA6 on a STM32WL55JC MCU. During normal operation the IC is working fine and we are able to take readings that are correct.
We are having issues with the MAX IC when the STM32 is:
- Held in Reset
- Powered but not Programmed
- In Deep Sleep
In all of these cases, the SPI lines on the STM32 are held in the reset state, which is High-Z. We are seeing the SPI lines sit at 0.5V and the current consumption of the board increase by 30mA. We have narrowed it down to this IC by process of elimination. I suspect there is some interaction with the protection diodes inside the MAX IC and the the SPI lines?
We also have a load switch on the VDD line for the MAX IC, and when the STM32 is Hi-Z and we disable the load switch (so VDD is floating) we see 1.65V appear on VDD (back powered through the STM32?) and the current consumption increase by >50mA.
Any ideas what is going on here? We've tried shorting CS to VDD to disable the SPI bus on the MAX IC whilst the STM32 is Hi-Z but this has made no difference.
-
Have you got SPI pull-up resistors, for when the STM is high-Z? Without them, you'll have floaty voltages and perhaps high current draw due to shoot thru on non-schmitt trigger inputs.
-
In addition to what voltsandjolts wrote:
- You mention a load switch to the MCP31855. So this device cannot draw power, except by some parasitic effects.
- If the STM HiZ's its GPIO's, those shouldn't be able to provide more than some µA leakage to outside connections that are within the STM's supply rails.
How to get more intel:
- This shouldn't change things: Add PullUps to the MCP31855. A SO8 provides some rather comfy pads for 0603 tombstones
- Start lifting legs of the SO8
- see what happens in each case
Hard to say more without a look at the whole circuit.
-
When you disable Vdd to the Maxim part are you also setting all SPI lines (including CS) to ground, or tri-stating them with any internal pull-ups disabled? If not then you are back feeding the Maxim through it's internal ESD diodes.
-
Thanks for the comments!
So at the moment there are no pull ups or pull downs on the SPI lines. The STM32 pins should be Hi-Z with no pull ups or pull downs enabled during reset and sleep. I'm currently not using the load switch, have fitted R14 to bypass it.
I do agree it could well be an issue with CS floating causing the MAX IC to try and drive SDO high, but I don't see why this would result in an extra 30mA of supply current when the SPI input is high Z. I have manually set the pins to Hi-Z at run time, and not seen a large increase in current which further confuses things.
The attached should give the relevant parts of the schematic.
I suspect we will re-spin the design to add a buffer like this https://www.ti.com/product/SN74AVC4T774 (https://www.ti.com/product/SN74AVC4T774) with pull ups/downs on both sides. Then the load switch can power VCCB from the main 3v3 supply (VCCA). It does feel like this should work without the buffer though.
-
With that design you are in a good position to isolate the MAX31855.
Either use the load switch or that 0R0.
Setting the GPIO's to HiZ without any results may be a hint that the issue is somewhere else.Any other devices on the SPI?
Recommendation: It being a thermocouple interface, you don't need the MAX31855 to run your board. Take it out and rerun your tests.
-
I don't see why this would result in an extra 30mA of supply current when the SPI input is high Z.
Just to be clear, floating cmos inputs can cause high supply currents:
https://www.ti.com/lit/pdf/scba004 (https://www.ti.com/lit/pdf/scba004)