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.
Tool/software: Code Composer Studio
Hi everyone,
All my PWM counter is up-down count mode, I use ePWM11, 12 to reset SDFM directly.
And latch data by CLA, triggered by ePWM2 CMPC count-up INT.
For example, by setting ePWM2.CMPC = ePWM1.CMPC = 1000, including filter latency plus 10 SDFM CLK time.
By the 28377 spec, because the SDFM data register wont be clear after reset filter module, CLA should get data.
However, the data is reset after sync SDFM, I have to set ePWM11.CPMC earlier about 2us to avoid this situation, is this normal?
Of course I notice that there should be only one CPMC event per PWM cycle,
but if I only latch data at 1000 count-up, I can ignored the result from second CMPC reset.
p.s. My question is same as question 2 in this post :
Manoj,
Sorry for the unclear information, here they are:
1) SDFM settings:
-DOSR:256
-Filter: sinc3
-CLK: 10MHz
-MIF: disable
-Reset: enable
2) EPWM settings:-
- TBPRD : 6250 (up-down count)
- CMPC / CMPD : 4140
- PWM frequency: 8K
3) CLA trigger source settings:-
- trigger source: ePWM2 CMPC up-count
- CMPC: 3940
And yes, I don't use SDFM AEFx to trigger latch function, I use another ePWM counter to trigger CLA at the right time.
The time was 3 * (256 / 10M) + 10 SDFM CLK.
3 * (256 / 10M) + 10 SDFM CLK. = 3940
My question is:
Will the SDFM data register also be reset when sync signal happened?
According to spec, the register data wont be clear after sync signal, however, if I set ePWM11.CMPC = ePWM2.CMPC = 3940 , then I will get 0.
Willie
Willie,
As mentioned in my previous post, SDSYNC pulse from PWMs DON'T reset the contents of SDFM data register. It just resets the SDFM internal DOSR counter. If you read the SDFM data register after waiting for latency of data filter + 5 additional SD-Cx period, you are guaranteed to read correct digital output.
Regards,
Manoj
Manoj,
For safety reason, I read data after ((3*256) + 10) / 10MHz = 78.3 us after SDSYNC event.
But the next SDSYNC event by ePWM11 also trigger after 78.3 us after last SDSYNC event.
Read and SDSYNC are at the same time.
According to my experiment, to avoid reading 0, the next SDSYNC must delay 2us, otherwise I got 0.
I read data at CLA which is triggered by PWM counter, Is it possible that CLA is too slow so SDFM data register is cleaned for the first data after SDSYNC?
Manoj,
Manoj Santha Mohan said:
I also don't see why you need of additional 5 SD-Cx. Reading the result at ((3*256) + 5) / 10MHz = 77.3 us should get you correct filter output result.
Adding 5 SD_Cx is experiment result, maybe I did something wrong, I'll check these days.
Manoj Santha Mohan said:Also, you cannot read the filter output / reset the data filter at the same time. This can lead to unpredictable results. That probably why you are seeing 0 in your result register.
So, how long dose TI suggest the time interval between read and reset?
If user cannot read and reset at the same time, the TRM notes "reset won't clear data" is non-sense. Or, is there an application that use this feature?
Manoj Santha Mohan said:we have never had customers who want to reset and read the SDFM data filter at the same time.
Thanks for your answer!
If so, then the TRM should not mention reset won't clear data register. Because this is wrong and the action is forbidden.