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.

TMS320F280025: Update blanking window during run time

Part Number: TMS320F280025

Dear Champs,

I am asking this for our customer.

The user is thinking to update blanking window registers during runtime in every PWM cycle with duty update including DCFOFFSET and DCFWINDOW.

Questions:

1. DCFOFFSET and DCFWINDOW do not have shadow registers like CMPA/CMPB. Therefore, if the user updates DCFOFFSET and DCFWINDOW during run time in a PWM cycle, they will be updated immediately. Is it right? 

2. For DCFWINDOW

On the datasheet, it says "If the blanking window is currently active and the offset counter expires, the blanking window counter is not restarted and the blanking window is cut short prematurely. Care should be taken to avoid this situation."

We are confused about this statement.

Does that mean if the user updates a new DCFWINDOW when DCFOFFSETCNT has been zero, then existing DCFWINDOWCNT will stop counting down immediately? 

DCFOFFSET will be loaded after the next DCFCTL.PULSESEL time, and then DCFOFFSETCNT starts counting down.

After DCFOFFSETCNT has been counting down to zero, then the new DCFWINDOW will be loaded and DCFWINDOWCNT start counting down again.

But if the user updates a new DCFWINDOW when DCFOFFSETCNT has not been zero, then after DCFOFFSETCNT has been counting down to zero, then the new DCFWINDOW will be loaded and DCFWINDOWCNT start counting down again.

Is our understanding correct?

If not, would you please make the above statement clearer?

  • DCFOFFSET and DCFWINDOW do not have shadow registers like CMPA/CMPB. Therefore, if the user updates DCFOFFSET and DCFWINDOW during run time in a PWM cycle, they will be updated immediately. Is it right? 

    Correct!

  • "If the blanking window is currently active and the offset counter expires, the blanking window counter is not restarted and the blanking window is cut short prematurely. Care should be taken to avoid this situation."

    This means that Blanking window is currently active and its counter is running and your signal is blanking the output. At the same time your offset window counter is active and while the blanking is still on-going, the offset window expires, then when the blanking window from the last trigger finishes blanking, it wont restart again from the new offset counter expiring.

    Nima

  • Dear Nima,

    1. "active" means that DCFOFFSETCNT or DCFWINDOWCNT is not zero. Correct?

    2. You meant when DCFOFFSETCNT has been zero and DCFWINDOWCNT is not zero (active) and there is a new update on DCFOFFSET, which is loaded to DCFOFFSETCNT to count down while DCFWINDOWCNT is still counting down. In this case, both DCFOFFSETCNT and DCFWINDOWCNT will count down to zero and then stops. And there will not be any more load on DCFOFFSETCNT and DCFWINDOWCNT. Blanking window function just stops.

    Is my understanding correct?

    3. To avoid the above situation, the user has to update DCFOFFSET and DCFWINDOW when both DCFOFFSETCNT and DCFWINDOWCNT are zero (inactive).

    Is my understanding correct?

  • . "active" means that DCFOFFSETCNT or DCFWINDOWCNT is not zero. Correct?

    Active means it is currently blanking and the counter in it is running.

    . In this case, both DCFOFFSETCNT and DCFWINDOWCNT will count down to zero and then stops. And there will not be any more load on DCFOFFSETCNT and DCFWINDOWCNT.

    Only if the OFFSET CNT hits ZERO BEFORE the window CNT hits ZERO. If it happens after, then it will trigger a new WINDOW CNT to start.

    To avoid the above situation, the user has to update DCFOFFSET and DCFWINDOW when both DCFOFFSETCNT and DCFWINDOWCNT are zero (inactive).

    Only when DCF winodw is ZERO (inactive). But again, you can set the offset when it is active as long as the offset counter takes longer to expire than the currently active window counter.