FAQ: How do I determine LFO count cycles for the OCU?

Document created by CommanderDave Employee on Apr 29, 2016
Version 1Show Document
  • View in full screen mode

Programming the LFO count cycles is crucial to the operation of the OCU. There are two registers that require programming for the counts, OCU_MAXCNT and OCU_MINCNT, which program the maximum and minimum cycle counts allowed. The following information is required for the cycle count equations:

SYS CLOCK frequency

Clock crystal PPM (parts per million)

LFO Frequency

LFO crystal PPM (parts per million)

 

The PPM is required to determine potential frequency drift of the crystals over time. If any of the crystals drift past these values, a clock drift fault will occur.

 

The following equation is used to determine max and min counts:

sysclk_cnt = (ref_cnt / ocu_clk) * sysclk;  

*pREG_OCU0_MINCNT = (sysclk_cnt * (1 - (clk_ppm*0.000001)) * (1 - (lfo_ppm*0.000001)) - 2);

*pREG_OCU0_MAXCNT = (sysclk_cnt * (1 + (clk_ppm*0.000001)) * (1 + (lfo_ppm*0.000001)) + 2);

Attachments

    Outcomes