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.
etherlabmaster-1.5.2-2526-c_dc_helpers.patch
Description: etherlabmaster-1.5.2-2526-c_dc_helpers.patch
_______________________________________________ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users