This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EVM430-F6736: Frequency estimations in TIDM-3PH-ENERGY5-ESD_1.1

Part Number: EVM430-F6736
Other Parts Discussed in Thread: TIDM-3PH-ENERGY5-ESD

Dear Mr Erick,

This has reference to your slides shared on related thread on EVM430-F6736



Need help on couple of freq measurement related implementation in TIDM-3PH-ENERGY5-ESD_1.1

1. metrology-background.c, line 502 , do we assume this ELSE case caters for Xcross1 and IF case caters for Xcross2

 

else
                    {
                        phase->metrology.voltage_period.cycle_samples = 0;
                    }




2. metrology-setup.c, line 667,  what's the purpose and basis for magic number 6554 in code snippet below

phase->metrology.voltage_period.period = ((SAMPLES_PER_10_SECONDS*6554)/MAINS_NOMINAL_FREQUENCY) << 8;





and why <<8


3. metrology-background.c, line 496 , Why <<12 the samples and why >>4 the previous period. Kindly explain basis for overall formula below

phase->metrology.voltage_period.period += ((int32_t) (phase->metrology.voltage_period.cycle_samples - z) << 12) - (phase->metrology.voltage_period.period >> 4);