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: get Data out Sigma-Delta Filter to analyze and compare

Part Number: TMS320F28377D
Other Parts Discussed in Thread: TMS320F28379D, AMC1305M25, CONTROLSUITE

Hi community, I got problems to get the right data out of the Sigma-Delta Filter Module. The bitstream is made by a AMC1305M25 from TI. For filtering I use the integrated SDFM of a TMS320F28379D (ControlCard Version with Docking-Station).
Both sides need a CLK to work correctly and I configured a ePWM-Module on the TMS320F28379D for this. The CLK running with 20 MHz to get detailed data by the most speed.

For the first test I used a project out of  the ControlSuite "sdfm_pwm_sync". The configuration basic configuration of the SDFM-Data-Filter with a OSR of 256 and Bitshift of 9 Bits let get me exact values of a positv voltage at the shunt. (At this moment I only use a positiv DC offset and no AC voltage.) In my mind the value for a negativ DC Offset is not correct .
Example:
The true Voltage that can be measured on the Shunt is 170 mV.
(Configuration OSR=256; Bitshift=9)
From the SDFM I get a Integer value of 17524 (binary 0100010001110100).
I caculated
[(max.Full-Scale-Range) / (Data in 16-Bit)] x SDFM-Data-value = voltage over the shunt
[(0,32 V) / (2^15)] x 17524 = 0,171V
This is correct I think.

Now I switch the polarity of the DC-Offset (-170mV) and get...
(Configuration OSR=256; Bitshift=9)
From the SDFM I get a integer value of 65462 (binary 1111111110110110).
This should be a value in Form of a Two's Complement.
The new integer value would be 74 for this.
But even 74 or 65462 let me get back the origin voltage  value of -170mV.

For my desired configuration of a OSR=64 and Bitshift=4, I even get not the expected values. In the technical refrence manual I found a guide for the correct Bitshift.
Table 13-5. Shift Control Bit Configuration Settings
But I think this is not correct, because the values I get don´t suite to the expected values. I decided to change the Bitshift to 3 and now I get expected values for a positive DC offset.
The true Voltage that can be measured on the Shunt is 170 mV.
(Configuration OSR=64; Bitshift=3)
From the SDFM I get a Integer value of 17524 (binary 0100010001110100).
I caculated
[(0,32 V) / (2^15)] x 17524 = 0,171V
This is correct I think.

Now I switch the polarity of the DC-Offset (-170mV) and get...
(Configuration OSR=64; Bitshift=3)
From the SDFM I get a integer value of 65453 (binary 1111111110101101).
This should be a value in Form of a Two's Complement.
The new integer value would be 83 for this.
But even 83 or 65453 let me get back the origin voltage  value of -170mV.


What I am doing wrong?
Is it possible to measure negativ values or is the origin project i used not made for this?
Is the Bitshift correct? Is my calculation wrong?

I would be happy to get a helpful response.

Basti

  • Basti,

    Table 13-5. Shift Control Bit Configuration Settings provided in the table is indeed correct. For certain OSRs like 32, 64, 128, 256 we need to right shift additional bit and here is why?

    For example with OSR = 32,

    Min value = -32768, in 16 bit mode, min value = 0x8000
    Max value = 32768, in 16 bit mode, max value = 0x8000

    For OSR = 32, if you right shift by 0, you will get only 0x8000 for both min and max value. This is clearly incorrect. But, if you right shift by additional bit you get min value = -16384 & max value = 16384 and you will be able to differentiate between min and max value.

    You will have this problem only when SD-modulator is operated in saturation region. If the analog differential voltage applied to SD-modulator is within specified linear full scale range (FSR) you don't need additional bit mentioned here.

    Regards,
    Manoj
  • Hello Manoj,


    Sorry for my mistake, but I got a mass problem in the circuit and this produces wrong data output for negative voltages.

    But now I configured two filters for the same bitstream.
    The first bitstream get filtered with OSR=256 and Bitshift=9. This is the original Configuration and give logical values back.
    My new configuration with OSR=64 and Bitshift=3 on the the same Bitstream gives me the same value back.
    Because of this result I stay at the point, that the table is wrong and I have to use a Bitshift of 3 and not 4 to get right values back.

    Regards Basti

  • Basti,

    The table is not wrong.

    As I mentioned above, you can bitshift by 3 at OSR=64, if differential analog voltage input works in linear full scale range and doesn't reach saturation. You need the additional bitshift of 4 when SD-modulator is saturated.

    Regards,
    Manoj