Anniyan_x
Member
if let say i have distributed RTC (real time clock), it can be internal RTC or External RTC chips to be synchronized to a reference a clock (GPS or master CPU) up to miliseconds range........actually the design is to cater for SOE (sequence of event detection & time stamping) within 1ms accuracy for digital input card. let say i have 40 slave cards with events between 1ms range, i must be able to timestamped each event within 1ms accuracy refered to the master cpu time.
it is a master slave (multidrop) architecture using rs485. the slave controllers must synchronized their time with the master controller to achive this. each slave have their own RTC (the slave will a stm32F4 mcu).
In the master CPU controller i have [2 x rs485] ports, where 1 port RS485(1) already used for DATA communication (include reference time command also) and another unused rs485(2), and 2 gpios pins. thats all.
------------------------------------------------------------------------------------
for now i plan to use a synchronizing pulse (1 pulse per-second) generated by the master mcu and distributed the pulse through a rs485(2) to all the slave mcu and upon receiving this pulse, the RTC timer will be reset (only the subseconds/miliseconds will be reset), meaning i plan use the 1pps pulse just to reset the miliseconds counter so that it wont drift away & send the reference TIME (the time to set to slave) using rs485(1) but i worry the propagation delays because the rs485(1) uses a custom communications protocol.
OR
i use a dedicated time system where when every seconds tick in the master controller,i just send the current time to the slave controller using rs485(2) and leave rs485(1) is only for DATA communications. so the rs485(2) just send the time in a very simple frame to reduce the propagation delays,not a full communication protocol as rs485(1).
anyway because i plan use dedicated RTC and not timers modules, i believe much of drift issue,OSC calibrations issue & etc will taken care by RTC hardware system.
so only the propagation delays of sending the time from master to slave using rs485 is the issue now.... how to reduce it??
there are 1 special protocols such as IRIG B, but to implement it i need to write the IRIG decoder and encoder. not sure how difficult it is?? anybody had implement IRIG B?? any idea on implementations method, guides?? or without IRIGB, can implement 1ms timestamps between multiple distributed slave controllers. or can we achieve without encoding the master time in IRIG format to be distributed to the slaves.....
it is a master slave (multidrop) architecture using rs485. the slave controllers must synchronized their time with the master controller to achive this. each slave have their own RTC (the slave will a stm32F4 mcu).
In the master CPU controller i have [2 x rs485] ports, where 1 port RS485(1) already used for DATA communication (include reference time command also) and another unused rs485(2), and 2 gpios pins. thats all.
------------------------------------------------------------------------------------
for now i plan to use a synchronizing pulse (1 pulse per-second) generated by the master mcu and distributed the pulse through a rs485(2) to all the slave mcu and upon receiving this pulse, the RTC timer will be reset (only the subseconds/miliseconds will be reset), meaning i plan use the 1pps pulse just to reset the miliseconds counter so that it wont drift away & send the reference TIME (the time to set to slave) using rs485(1) but i worry the propagation delays because the rs485(1) uses a custom communications protocol.
OR
i use a dedicated time system where when every seconds tick in the master controller,i just send the current time to the slave controller using rs485(2) and leave rs485(1) is only for DATA communications. so the rs485(2) just send the time in a very simple frame to reduce the propagation delays,not a full communication protocol as rs485(1).
anyway because i plan use dedicated RTC and not timers modules, i believe much of drift issue,OSC calibrations issue & etc will taken care by RTC hardware system.
so only the propagation delays of sending the time from master to slave using rs485 is the issue now.... how to reduce it??
there are 1 special protocols such as IRIG B, but to implement it i need to write the IRIG decoder and encoder. not sure how difficult it is?? anybody had implement IRIG B?? any idea on implementations method, guides?? or without IRIGB, can implement 1ms timestamps between multiple distributed slave controllers. or can we achieve without encoding the master time in IRIG format to be distributed to the slaves.....
Last edited: