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.

TMS320F28377D: SDFM comparator unit output

Part Number: TMS320F28377D


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

  • Deqiang,

    For 0v input to SD modulator,

    Digital output expected on SDFM comparator = 16384

    Digital output expected on SDFM data filter     = 0

    For your lower threshold triggering unexpectedly, did you check F28377D errata item: SDFM: Comparator Filter Module may Generate Spurious Over-Value and Under-Value Conditions

    You have to make sure to wait for atleast the latency of SDFM compator filter and 5 SD-Cx cycles before enabling comparator interrupts.

    In your case: For Sinc3, COSR = 32

    Wait time = (3 x 32  + 5 ) SD-Cx period

    Regards,

    Manoj

  • Dear Manoj,

    Thanks very much for your reply! Yes, I add the delay to my scripts. I solved this problem by adding a Sdfm_clearFlagRegister before running main.c.

    I suppose I should clear the flag before I use the function.

    Best regards,
    Deqiang