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.

CCS/LAUNCHXL-F28069M: Timer Overflow Interrupt, Getting ADC Values & Changing Duty Cycle By Cycle

Part Number: LAUNCHXL-F28069M
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

Hello all,

I need to ask about the graphic I have added below.

I have Launchxl-f28069m kit and I generate 1kHz pwm square waves with ePWM outputs. I also sample ADC feedback values, compare with a suitable voltage value and according to the result, I change their duty cycle.

But what I want to do is slightly different.

At the top side of the graphic I wanted to show system clock/timer signals. Let's say it is a 1ms timer/clock. The bottom graph shows my ADC feedback (SOC etc).

At timer's compare or overflow value, I want to start reading ADC fb values, I want to sum those feedback samples (integrator logic) maybe every 10us or 100us until timer's compare/overflow value ends.

Then according to that total ADC fb value I calculated, by comparing with a suitable value, I want to change my ePWMs' duty cycle at next pwm period. I want to do that "cycle by cycle".

I think LAUNCHXL-F28069M is fast enough to do this. Actually, way faster for what I need. But I want to be sure if it is possible.

Plus, could you tell me which reqisters I should use to detect system timer's overflow time range? Is there any spesific one?

Thanks for your attention.

  • No idea? :)

    • Enable ePWM module clocks in the PCLKCR1 register.
    • Set TBCLKSYNC to 0.
    • Configure prescaler values and ePWM modes.
    • Set TBCLKSYNC to 1.

    TBCLK Time-base clock :
    This is a prescaled version of the system clock (SYSCLKOUT) and is used by all submodules within the
    ePWM. This clock determines the rate at which time-base counter increments or decrements.

    This should have an overflow register for a set value somewhere.

  • Anyway, I think "C:\ti\controlSUITE\development_kits\F28069 controlSTICK\ADC - TriggeredADC" will work for me.
  • John,

    Yes, this can be done. For graceful updates, you can enable shadow load so that register updates are only activated at the period boundary.

    -Tommy