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.

TMS320F280038C-Q1: Update in main-loop of ADC Trigger Event Presecaler

Part Number: TMS320F280038C-Q1

Hi,

I use EPWM to trigger ADC. Therefore, I go in to interrupt at every 20usec by using below line.

Can I update number 2 to 1 or 2 to 3 during my main-loop? How and when does the change takes place in real? Can you draw?

    //=================== ADC Triggerring =======================//
    EPWM_disableADCTrigger(base1, EPWM_SOC_A);

    EPWM_setADCTriggerSource(base1, EPWM_SOC_A, EPWM_SOC_TBCTR_ZERO);
    EPWM_setADCTriggerEventPrescale(base1, EPWM_SOC_A, 2);

    EPWM_enableADCTrigger(base1, EPWM_SOC_A);

Kind regards

  • Hello Gokhan,

    Can I update number 2 to 1 or 2 to 3 during my main-loop

    Yes you can change it to whatever value you desire it will update as soon as the function sets the value in the register. There are no restrictions.

    If you have questions on what register configuration it writes to I will recommend you to refer to the driverlib function definition and refer to the technical reference manual for exact details.

    Thanks,
    Prarthan