Commit 7e5ea9a1 authored by Jean-Claude BAU's avatar Jean-Claude BAU

Fix issue: PPS generation behavior

When the PPS generation is forced by configuration, the PPS was disabled
when an instance was leaving the UNCALIB/SLAVE states to another state.
parent cfdfcf9d
...@@ -219,7 +219,8 @@ static void l1e_state_change(struct pp_instance *ppi) { ...@@ -219,7 +219,8 @@ static void l1e_state_change(struct pp_instance *ppi) {
if ( ppi->state==PPS_SLAVE && ppi->next_state!=PPS_UNCALIBRATED && if ( ppi->state==PPS_SLAVE && ppi->next_state!=PPS_UNCALIBRATED &&
L1E_DSPOR(ppi)->basic.L1SyncState!=L1SYNC_DISABLED ) { L1E_DSPOR(ppi)->basic.L1SyncState!=L1SYNC_DISABLED ) {
/* Leave SLAVE state : We must stop the PPS generation */ /* Leave SLAVE state : We must stop the PPS generation */
TOPS(ppi)->enable_timing_output(GLBS(ppi),0); if ( !GOPTS(GLBS(ppi))->forcePpsGen )
TOPS(ppi)->enable_timing_output(GLBS(ppi),0);
WRH_OPER()->locking_disable(ppi); WRH_OPER()->locking_disable(ppi);
WRH_OPER()->locking_reset(ppi); WRH_OPER()->locking_reset(ppi);
l1e_servo_reset(ppi); l1e_servo_reset(ppi);
......
...@@ -240,7 +240,8 @@ static void wr_state_change(struct pp_instance *ppi) ...@@ -240,7 +240,8 @@ static void wr_state_change(struct pp_instance *ppi)
WRH_OPER()->locking_reset(ppi); WRH_OPER()->locking_reset(ppi);
if ( ppi->next_state!=PPS_UNCALIBRATED ) { if ( ppi->next_state!=PPS_UNCALIBRATED ) {
/* Leave SLAVE/UNCALIB states : We must stop the PPS generation */ /* Leave SLAVE/UNCALIB states : We must stop the PPS generation */
TOPS(ppi)->enable_timing_output(GLBS(ppi),0); if ( !GOPTS(GLBS(ppi))->forcePpsGen )
TOPS(ppi)->enable_timing_output(GLBS(ppi),0);
} }
} }
} }
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
static void state_change(struct pp_instance *ppi) { static void state_change(struct pp_instance *ppi) {
if ( ppi->state==PPS_SLAVE && ppi->next_state!=PPS_UNCALIBRATED ) { if ( ppi->state==PPS_SLAVE && ppi->next_state!=PPS_UNCALIBRATED ) {
/* Leave SLAVE state : We must stop the timing output generation */ /* Leave SLAVE state : We must stop the timing output generation */
TOPS(ppi)->enable_timing_output(GLBS(ppi),0); if ( !GOPTS(GLBS(ppi))->forcePpsGen )
TOPS(ppi)->enable_timing_output(GLBS(ppi),0);
} }
} }
struct pp_ext_hooks pp_hooks={ struct pp_ext_hooks pp_hooks={
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment