2024-04-30 07:30 AM - last edited on 2024-05-15 05:30 AM by Peter BENSCH
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.
Solved! Go to Solution.
2024-05-17 12:23 AM
Hi,
>I also cannot see any information about the galvanic isolation/barrier.
Right, because there is no isolation/barrier .
2024-05-15 05:28 AM - edited 2024-05-24 01:57 AM
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
2024-05-15 05:59 AM
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
2024-05-15 06:49 AM
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.
2024-05-15 07:01 AM
2024-05-15 07:26 AM - edited 2024-05-24 01:58 AM
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]
2024-05-16 10:42 PM
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?
2024-05-16 11:47 PM - edited 2024-05-24 01:54 AM
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]
2024-05-17 12:23 AM
Hi,
>I also cannot see any information about the galvanic isolation/barrier.
Right, because there is no isolation/barrier .
2024-05-17 01:03 AM
Thanks for all the information.
It is now completely clear.