cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing A7 and M4 based on a PPS signal

S_2
Associate II

Hello everyone,

I need a way to synchronize A7 and M4 cores (find the same timestamp) within 1 ~ 2 usec. Is there any shared timer or resources except for memory and virtual serial com between these two cores? I have a PPS signal and I want A7 to be aware of its arrival, but it has a 10 usec latency from the moment the PPS signal arrives! I do appreciate it if you let me know about viable methods I can take to mitigate this issue. 

Best,

Saeed

1 REPLY 1
PatrickF
ST Employee

Hi @Community member​ 

I don't have an out of the box solution, but maybe look at something around connecting your external PPS signal to two timers trigger input (to reset the counters simultaneously), one timer assigned to Linux, and one timer assigned to M4, both counting on a clock from same root (e.g. HSE).

Then by reading the relevant timers count when you need them on either A7 or M4 side, you will have an absolute time indication Vs the real signal occurrence.

For timestamping, you could also check reading STGENR which is available for both A7 and M4 (but STGEN cannot be synchronized to an external pin).

This post could also be of interest: https://community.st.com/s/question/0D53W00000oXAqhSAG

Regards.

In order 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.