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.

TMS320F280037: Enable/Disable EPWM/DMA/CMPSS during runtime

Part Number: TMS320F280037


Tool/software:

Hi champs,

I am asking this for our customer.

The user want to enable these modules when needed and disable them when not needed.

1. If the user wants to disable EPWM+ADC+DMA

Can they just use these API?

           SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_EPWM8);

           DMA_stopChannel(DMA_ADC_BASE);

           DMA_disableTrigger(DMA_ADC_BASE);

2. Likewise, if the user wants to enable them again, can they just use these API?

             DMA_enableTrigger(DMA_ADC_BASE);

             DMA_startChannel(DMA_ADC_BASE);

             SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM8);

3. If the user wants to enable/disable CMPSS during run time, can they just use these?

                        CMPSS_enableModule(CMPSS1_BASE);

                        CMPSS_disableModule(CMPSS1_BASE);

4. Is there any concern if the user enable/disable these modules during runtime?

5. By enabling DMA or disabling DMA for moving data from ADC result registers, is it possible to affect ADC measurement performance?

  • Hi Wayne,

    1. If the user wants to disable EPWM+ADC+DMA

    From a DMA perspective, they can simply call DMA_stopChannel() whenever they want to disable DMA operations, and even if triggers are sent to DMA, no transfers will occur. This is as long as they don't have continuous mode enabled, otherwise the channel will be automatically re-enabled at the end of each transfer.

    2. Likewise, if the user wants to enable them again, can they just use these API?

    To re-enable the DMA channel, they can just call DMA_startChannel().

    5. By enabling DMA or disabling DMA for moving data from ADC result registers, is it possible to affect ADC measurement performance?

    No, enabling or disabling the DMA module should not affect the performance of the ADC since they are separate modules.

    Best Regards,

    Delaney

  • Hi Wayne,

    3. Yes, user can use these APIs to enable and disable CMPSS.

    4. Regarding CMPSS, remember if customer disable cmpss during run time, a power up time of 500us is needed for CMPSS DAC.