[etherlab-users] Fix for ecrt_master_select_reference_clock

Graeme Foot GraemeF at touchcut.com
Thu Jun 13 05:21:08 CEST 2013


Hi,

 

I just noticed that ecrt_master_select_reference_clock hasn't been
working.

 

On startup the master auto selects the first DC slave in
ecrt_master_select_reference_clock.

 

Problem 1:

Calling ecrt_master_select_reference_clock selects the slave config to
use, but does not activate it immediately.
ecrt_master_select_reference_clock is only called if the bus is
rescanned, at which point problem 2 happens.

 

Problem 2:

ecrt_master_select_reference_clock is called before slaves are attached
to the slave configs so trying to set up dc_ref_config fails and then no
slave is set up as the dc_ref_clock.

 

 

I have attached a patch that corrects the above problems.  The patch
also contains a few other things I change so I've added a description of
my changes for this problem below.

 

 

master/master.c

 

ec_master_find_dc_ref_clock

- If using dc_ref_config fails then all slaves are scanned for the first
slave to support DC

 

ecrt_master_select_reference_clock

- Calls ec_master_find_dc_ref_clock

- I have removed the dc capabilities check as these are in
ec_master_find_dc_ref_clock anyway

 

master/fsm_master.c

 

ec_fsm_master_state_scan_slave

- I have moved ec_master_calc_dc after ec_master_attach_slave_configs

 

 

Regards,

Graeme Foot.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20130613/8ea2b0af/attachment-0003.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: etherlabmaster-1.5.2-2526-c_dc_helpers.patch
Type: application/octet-stream
Size: 19683 bytes
Desc: etherlabmaster-1.5.2-2526-c_dc_helpers.patch
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20130613/8ea2b0af/attachment-0003.obj>


More information about the Etherlab-users mailing list