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