Hi Guys,
CCS v 6.2(compiler version = TI v15.12.3.LTS)
TMX320F28075 Control Card
control Suite v 3.4.1
Requirement with F28075(currently we use a TMX device) :
1] EPWM1.TBPRD == SDFM.DataTime (i.e., both are synchronized and has the same time period)
2] EPWM1.PRD.Interrupt > CLA_Task_1 > Read SDFM Data.
Our Configuration :
SDFM1 Filter Settings : Only FILTER1 is enabled, SINC2, OSR_200 (i.e., @ 10 MHz SD CLK, Latency Time = 40us & Data Time = 20us), Data_Acknowledge_Interrupt_enable.
SDFM1_ISR : Toggle GPIO31 (used for verification via oscilloscope)
EPWM1.TBPRD = SDFM Data Time (i.e., @ 60 MHz EPWM CLK, 20us)
EPWM11.TBPRD = SDFM Data Time (i.e., @ 60 MHz EPWM CLK, 20us)
EPWM11.CMPC = SDFM Data Time – 2us (i.e., @ 60 MHz EPWM CLK, 18us)
EPWM11.Interrupt : Enable_at_PRD
The FILRESEN is ON only in the first time period of T, and then it is turned OFF in the EPWM11_ISR. This means that the SDFM is reset only once and that too only in the first time period of T. Please see the following figure:
At the CMPC event the DOSR is reset to zero and the SDFM Module starts to sample the input signal from that point. The latency time is 40 us and the data time is 20us. So it is expected to be synchronized with EPWM1 whose time period is 20 us as shown in the fig above. But in reality, we did not get this result.
Reason:
1] Data time is not constant. As calculated from the formulas mentioned in TRM, data time should always be 20us which is not the case in reality. See fig below:
A GPIO toggles inside the SDFM1_ISR, so we should get a pulse with time period 40us and duty cycle 50%. But as you can see above we have a small error in each cycle which accumulates over a large time period causing EPWM and SDFM go out of synchronisation.
EPWM1 will be operated with a switching frequency between 10 – 70 kHz (i.e., 1 new data for every 14 us in case of 70kHz) . So we cannot reset the SDFM every time due to the higher latency time period and also the first data or first two datas will be incorrect (costs more time).
We need to read a new SDFM data at every EPWM.PRD and the both should be synchronised. Please provide a solution or an alternative to achieve this requirement.


