Commit 06bb7dfa authored by Maciej Lipinski's avatar Maciej Lipinski

[hack] enables to disable interrupts in LM32 - a hackish way to stop PLL loop…

[hack] enables to disable interrupts in LM32 - a hackish way to stop PLL loop and let the VXCO running on its own - was done purely experimentally
parent 0e943965
...@@ -36,7 +36,10 @@ void wr_servo_enable_tracking(int enable) ...@@ -36,7 +36,10 @@ void wr_servo_enable_tracking(int enable)
{ {
tracking_enabled = enable; tracking_enabled = enable;
} }
int wr_servo_tracking_get()
{
return tracking_enabled;
}
static void dump_timestamp(char *what, wr_timestamp_t ts) static void dump_timestamp(char *what, wr_timestamp_t ts)
{ {
......
...@@ -140,14 +140,18 @@ void multiProtocol(RunTimeOpts *rtOpts, PtpPortDS *ptpPortDS) ...@@ -140,14 +140,18 @@ void multiProtocol(RunTimeOpts *rtOpts, PtpPortDS *ptpPortDS)
ptpPortDS[i].linkUP = FALSE; ptpPortDS[i].linkUP = FALSE;
} }
PTPD_TRACE(TRACE_ERROR, NULL,"ML: hacked\n");
for(;;) for(;;)
{ {
for (i=0; i < rtOpts->portNumber; i++) for (i=0; i < rtOpts->portNumber; i++)
singlePortLoop(rtOpts, &ptpPortDS[i], i); singlePortLoop(rtOpts, &ptpPortDS[i], i);
sharedPortsLoop(ptpPortDS); sharedPortsLoop(ptpPortDS);
if(wr_servo_tracking_get() == 0)
{
netDisablePhaseTracking(&ptpPortDS[0].netPath);
PTPD_TRACE(TRACE_ERROR, NULL,"ML: hacked-> irq of LM32 off\n");
}
ptpd_handle_wripc(); ptpd_handle_wripc();
usleep(1000); usleep(1000);
} }
...@@ -156,8 +160,11 @@ void multiProtocol(RunTimeOpts *rtOpts, PtpPortDS *ptpPortDS) ...@@ -156,8 +160,11 @@ void multiProtocol(RunTimeOpts *rtOpts, PtpPortDS *ptpPortDS)
void hack(RunTimeOpts *rtOpts, PtpPortDS *ptpPortDS) void hack(RunTimeOpts *rtOpts, PtpPortDS *ptpPortDS)
{ {
netDisablePhaseTracking(&ptpPortDS[0].netPath); if(wr_servo_tracking_get() == 0)
PTPD_TRACE(TRACE_ERROR, NULL,"ML: hacked-> irq of LM32 off\n"); {
netDisablePhaseTracking(&ptpPortDS[0].netPath);
PTPD_TRACE(TRACE_ERROR, NULL,"ML: hacked-> irq of LM32 off\n");
}
} }
#endif #endif
......
...@@ -240,6 +240,7 @@ extern void issueWRSignalingMsg(Enumeration16 wrMessageID,RunTimeOpts *rtOpts,Pt ...@@ -240,6 +240,7 @@ extern void issueWRSignalingMsg(Enumeration16 wrMessageID,RunTimeOpts *rtOpts,Pt
#endif #endif
extern void wr_servo_enable_tracking(int enable); extern void wr_servo_enable_tracking(int enable);
extern int wr_servo_tracking_get();
extern int wr_servo_man_adjust_phase(int phase); extern int wr_servo_man_adjust_phase(int phase);
/* The code used pow(2, ...) but we don't want floating point here (ARub) */ /* The code used pow(2, ...) but we don't want floating point here (ARub) */
......
...@@ -469,7 +469,9 @@ void spll_enable_ptracker(int ref_channel, int enable) ...@@ -469,7 +469,9 @@ void spll_enable_ptracker(int ref_channel, int enable)
ptracker_mask &= ~(1<<ref_channel); ptracker_mask &= ~(1<<ref_channel);
if(ref_channel != softpll.mpll.id_ref) if(ref_channel != softpll.mpll.id_ref)
spll_enable_tagger(ref_channel, 0); spll_enable_tagger(ref_channel, 0);
disable_irq();
TRACE_DEV("Disabling ptracker tagger: %d\n", ref_channel); TRACE_DEV("Disabling ptracker tagger: %d\n", ref_channel);
TRACE_DEV("ML-hack - disable interrupt\n", ref_channel);
} }
} }
......
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