cancel
Showing results for 
Search instead for 
Did you mean: 

Heart beat signal.

murali
Associate III

Hi, MURALI SELVAM from India. I using "STM32H743VIT6" I want know heart beat signal hardware configuration, in the project I using three MCU for safety purpose, in case 1st MCU will get failure, 2nd one is take control, 2nd one will get  failure, 3rd one will take control for this I have taking "heart beat signal processing" but I don't know how to do hardware configuration and what kind of communication interface between three processor suitable for this like SPI, I2C. Anyone who know about it kindly let me know.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

You need to start learning about CAN protocol:

https://en.wikipedia.org/wiki/CAN_bus

I don't have a paper about heart beat on CAN protocol. May be you need to google it. But you need to understand first how CAN protocol is working to understand how to implement heartbeat.

 


The 3 MCUs not connected wireless, the 3 MCUs should connect physically.


To me the CAN bus still the best candidate in this case. And to my knowledge the RTR frame is used in automotive for heartbeat function to unsure that all nodes still functional.

 

 

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

9 REPLIES 9
SofLit
ST Employee

Hello,

You put some wireless tags on the thread so I’m not sure if you are opting for a wireless solution. If not I propose to opt for CAN bus. No master, no slave. All nodes communicate on the same bus. Each node will monitor the other ones. May be you need to use RTR frame.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Can I use CAN protocol for generating heart beat signal (you have any paper about heart beat signal kindly share me)? it will work perfectly? if The three MCUs are connected with CAN protocol, one MCU will get failure another MCU will take control is possible? Would you explain clearly?

 

The 3 MCUs not connected wireless, the 3 MCUs should connect physically.

 

Hello,

You need to start learning about CAN protocol:

https://en.wikipedia.org/wiki/CAN_bus

I don't have a paper about heart beat on CAN protocol. May be you need to google it. But you need to understand first how CAN protocol is working to understand how to implement heartbeat.

 


The 3 MCUs not connected wireless, the 3 MCUs should connect physically.


To me the CAN bus still the best candidate in this case. And to my knowledge the RTR frame is used in automotive for heartbeat function to unsure that all nodes still functional.

 

 

 

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

I plan to implement  heart beat signal through SPI protocol so generally I want know about how to implement and perform heart beat signal so that asked you.

   

Using SPI you need more pins and you need a master that manages this. Imagine that master will be off, how you will manage that?

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

in my project I will go to use three MCU, master one is fail, 2nd slave will take control, 3rd one is should not take control, 1st and 2nd failure that time only 3rd one will take control. This logic going to implement. is that possible for heart beat signal.

Below given logic possible over SPI Connection?

 

Failover Logic Implementation:

Master MCU Failure:
If the secondary slave MCU detects the absence of heartbeat signals from the master MCU, it initiates the failover process.
The secondary slave MCU transitions into a master mode of operation, assuming control of the system.
Secondary Slave MCU Failure:
If the master MCU detects the absence of heartbeat signals from the secondary slave MCU, it continues normal operation.
The master MCU does not initiate failover in this case, as it assumes that the secondary slave MCU may have failed but the system can still function without it.
Both Master and Secondary Slave MCU Failure:
If the third MCU (not involved in normal operation) detects the absence of heartbeat signals from both the master and secondary slave MCUs, it initiates the failover process.
The third MCU transitions into a master mode of operation, assuming control of the system.

But how a slave device will initiate a transaction? the clock is generated by the master? What about the topology of the busses? Did you think about the complexity of the HW and the software? 

I think it will be more complicated to implement than if the solution was implemented based on CAN bus.

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

For CAN protocol, you can have each MCU have it's own SOH (State of Health) send a message every 1 second. For example, Chrysler uses 11 bit CAN ID's and 0x4xx as the SOH ID's.

 

The BCM (Body Control Module) I believe was 0x400, then another node is 0x401 and so on. Upon the vehicle being turned on, each node would broadcast it's SOH ID. Based off that, each node would sync to the previous node and the node after it's own ID.

 

So the BCM would broadcast it's ID 0x400 along with a message data of 0x401 sent in two bytes, so 0x04 and 0x01. Then node 0x401 would see the data 0x04:0x01 as a cue and broadcast it's ID of 0x401 and a message data of 0x402. So node 0x402 would take that cue to send to the next node 0x403 and so on.

 

But if a node drops out because of some failure, the previous node and the node after the bad node would sync up. So let's say node 0x402 dropped out, then node 0x401 would then send it's SOH ID and a message data 0x403, instead of 0x402 

 

Based off that type of redundancy you could do something similar. Each of your node knows that 0x402 is no longer in the picture so any node, 0x400, 0x401 or 0x403 could be used as a backup and mimic what 0x402 did. 

If you find my answers useful, click the accept button so that way others can see the solution.

Hi,  Karl Yamashita..

             I understand you reply and I am new in CAN protocol so I have one doubt, Shall I use this CAN protocol for hear beat signal generation, For example One MCU can work in up to 250Mhz for timer, How much frequency I need to take for heart beat signal generation or else which frequency I need to take for calculation? 

 

If I going to use this  "STM32H743VIT6" IC for failure switch over like 1st is failure, 2nd one will take control, 1st and 2nd failure, 3rd one will take take control. I understand CAN protocol logic but I need to know, how to implement in Hardware and Firmware wise? How do I know this much of frequency not generator in this IC that will fault. 

 

Would you please provide clear explanation?