Author Topic: MAX31855 SPI Issue with STM32  (Read 1178 times)

0 Members and 1 Guest are viewing this topic.

Offline Matt CoatesTopic starter

  • Contributor
  • Posts: 37
  • Country: gb
MAX31855 SPI Issue with STM32
« 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.



« Last Edit: November 28, 2024, 02:42:34 pm by Matt Coates »
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2554
  • Country: gb
Re: MAX31855 SPI Issue with STM32
« Reply #1 on: November 28, 2024, 08:44:03 pm »
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.
 

Offline harerod

  • Frequent Contributor
  • **
  • Posts: 483
  • Country: de
  • ee - digital & analog
    • My services:
Re: MAX31855 SPI Issue with STM32
« Reply #2 on: November 28, 2024, 09:14:08 pm »
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.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3384
  • Country: gb
Re: MAX31855 SPI Issue with STM32
« Reply #3 on: November 28, 2024, 09:59:57 pm »
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.
 

Offline Matt CoatesTopic starter

  • Contributor
  • Posts: 37
  • Country: gb
Re: MAX31855 SPI Issue with STM32
« Reply #4 on: November 28, 2024, 10:32:39 pm »
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 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.
 

Offline harerod

  • Frequent Contributor
  • **
  • Posts: 483
  • Country: de
  • ee - digital & analog
    • My services:
Re: MAX31855 SPI Issue with STM32
« Reply #5 on: November 29, 2024, 07:56:05 am »
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.
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2554
  • Country: gb
Re: MAX31855 SPI Issue with STM32
« Reply #6 on: November 29, 2024, 09:57:21 am »
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

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf