Skip to main content
Associate
April 30, 2024
Solved

STPM33/34 MISO & Insulating barrier

  • April 30, 2024
  • 11 replies
  • 3449 views

Hello everyone

I am looking into the STPM33/34. I only want to use 1 SPI bus for both ICs and select it with the SCS.

In the datasheet I cannot see whether the MISO goes into tristate when the IC in question is not active.

I also cannot see any information about the galvanic isolation/barrier.

Can anyone give me information about this.
Thank you in advance.

Best answer by AScha.3

Hi,

>I also cannot see any information about the galvanic isolation/barrier.

Right, because there is no isolation/barrier .

11 replies

Peter BENSCH
Technical Moderator
May 15, 2024

Welcome @Martin68, to the community!

As far as I know, MISO with inactive SCS is not switched to tristate, so you would have to decouple MISO with a tristate buffer. [edit] See below where I confirm that multiple STPM3x can work on one SPI port and are selected via SCS, which unfortunately is not mentioned in the datasheet. [/edit]

The STPM3x devices are a perfect solution for manufacturers of e-meters, but due to the immense price pressure on these systems, galvanic isolation within the devices has been omitted. With a suitable circuit design (shunt to neutral, voltage measurement via voltage divider), the isolation can be shifted to the communication side (SPI or UART) or in front of the controlling MCU if the MCU is also on the high-voltage "hot" side.

Hope that helps?

Regards
/Peter

Martin68Author
Associate
May 15, 2024

Hello Peter,
the information is clear.
Can I connect the SPI in series as with standard SPI (STPM34 MOSI -> STPM33 MISO)?
Can the Uart TxD be connected directly to the MCU instead of SPI?

Regards,

Martin

Peter BENSCH
Technical Moderator
May 15, 2024

So far I have only seen applications in which the STPM3x were connected with one serial interface each. I assume that they cannot be operated in daisy chain, probably due to timing constraints.

I don't understand your second question, because SPI can also be connected directly to the MCU if it is on the hot side.

Martin68Author
Associate
May 15, 2024

The datasheet of UM2066 (Getting started with the STPM3x) contains figure 5 (see also attachment).
There are both TxD, both STPM, connected together.
I ask this because you just indicated that it is not possible with the MOSI.

Peter BENSCH
Technical Moderator
May 15, 2024

You should not confuse RXD with MISO.

UM2066 only deals with the case of RXD (UART), but does not mention MISO (SPI). I wrote in my first answer: ‘As far as I know, MISO with inactive SCS is not switched to tristate’. Unfortunately, I don't have any documentation available at the moment. However, to be sure, you can measure this by placing a 1:1 voltage divider on MISO and looking at the line with an oscilloscope.

[edit] See below where I confirm that multiple STPM3x can work on one SPI port and are selected via SCS, which unfortunately is not mentioned in the datasheet. [/edit]

Martin68Author
Associate
May 17, 2024

I don't confuse SPI and UART.
We are still in a phase where we can still choose between both options.

hence my other question whether the TxD line can do this.
Then we can determine what the best option is for us. So do I understand from this that the TxD (UART) can be connected together?

Peter BENSCH
Technical Moderator
May 17, 2024

I also understand UM2066, section 1.2.1, to mean that the RXD, TXD and SYN signals are connected directly in parallel and the respective STPM3x is selected with SCS. However, due to the lack of a board with this constellation, I am unfortunately unable to check this.

[edit] It was later confirmed that RXD, TXD and SYN can be connected directly in parallel, the selection of the respective STPM3x is then made via SCS. [/edit]

AScha.3
AScha.3Best answer
Super User
May 17, 2024

Hi,

>I also cannot see any information about the galvanic isolation/barrier.

Right, because there is no isolation/barrier .

"If you feel a post has answered your question, please click ""Accept as Solution""."
Martin68Author
Associate
May 17, 2024

Thanks for all the information.
It is now completely clear.

Peter BENSCH
Technical Moderator
May 24, 2024

Correction to my previous statements and confirmation: both TX (UART) and MISO (SPI) are switched to tristate when the relevant device is deactivated via SCS. Even if it is not explicitly mentioned in the data sheet, several STPM3x can be connected to the same SPI bus and selected via their own SCS.

I have marked the sentence in the previous statements accordingly.

Sorry for the confusion.

Regards
/Peter

Martin68Author
Associate
May 24, 2024

Hello,

Thanks for the update, this makes it a lot easier.
Thank you again for taking the time to do this.

Best regards,

Martin