Hello,
I'm using F28377D SDFM to sample the grid voltage for grid-tied inverter design.
The SDFM data filter module works great however I have a issue when designing a comparator for over-voltage protection. The sensed voltage is 0V but the flag Sdfm1Regs.SDIFLG.IFL2 = 1 which means "Comparator Filter 1 output is equal to or below the low level threshold, if enabled" from the datasheet. My voltage sensing circuit is almost a voltage divided which means the 0V should be converted to almost 0 as SDFM data filter output. If I understand correctly, the corresponding SDFM comparator output should be 32768/2=16384. My setting of the low level threshold is 0 thus the I suppose the Sdfm1Regs.SDIFLG.IFL2 should be 0. Could you help me solve this problem and give me a insight how to calculate the output of the SDFM comparator when COSR=32 and DOSR=64?
The comfigurations:
Comparator Module: SINC3, OSR_32, peak data value: 0~32768
by "Sdfm_configureComparator(1, FILTER2, SINC3, OSR_32, 0x7FFF, 0x0000);"
Data Filter Module: SINC3, OSR_64, peak data value -262144 ~262144
by "Sdfm_configureData_filter(1, FILTER2, FILTER_ENABLE, SINC3, OSR_64, DATA_32_BIT, SHIFT_0_BITS );"
Thanks very much!
Best regards,
Deqiang