µTasker Forum

µTasker Forum => NXPTM LPC2XXX and LPC17XX => Topic started by: Manish on October 23, 2013, 12:33:44 PM

Title: Sync task between two seperate lpc23xx controller using GPS
Post by: Manish on October 23, 2013, 12:33:44 PM
Mark,
  we want to sync two board which have same LPC2378 controller and same code of Utasker. if we connect a GPS and get 1 PPS interrupt at ENT0 of LPC23Xx, how can we synch both board's task?. so we can get same time and same task to run.

Thank,
Manish
Title: Re: Sync task between two seperate lpc23xx controller using GPS
Post by: mark on October 23, 2013, 01:17:07 PM
Hi Manish

This depends on the accuracy that you need.

The task can be scheduled from the ENT0 interrupts (at the same time) by sending an event, such as

fnInterruptMessage(GPS_TASK, EVENT_PPS);

(or similar).

However, there will be a delay between sending the event and the task handling it, which may differ between the two boards, depending on what is happening at the time.
In some cases the processing can be divided into two parts; critical processing and non-critical processing. This means that the critical processing is peformed directly in the interrupt routine (such as making accurate time stamps of the moment the interrupt occurred or capturing some other time critical information). Later the task handles any additional processing that can be performed in a less time critical manner, as well as any clean-up operations.
Most often this strategy results in a suitable solution but it depends on the absolute response times needed and the amount and type of processing involved.

Regards

Mark