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.

TMS320F28379D: Inquiries about the ePWM Using DMA example ??

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

HI 

Now, I am reviewing the example "epwm_ex9_dma" in the following directory.

C:\ti\c2000\C2000Ware_3_04_00_00\driverlib\f2837xd\examples\cpu1\epwm

I'm modifying it like the next image. Because I want to control with only one DMA controller channel (CH5).

How do I specify the parameter value of the red box in the following image?

Note by the following image, but I don't understand related to address index specification.

Could you explain in pictures.

The desired output waveform is as follows.

Thanks

  • Lee,

    You don't seem to changing TBPRD. But, I still see TBPRD defined in compareConfigs? Why have you done so?

    Also, what is the role of EPWM1?

    Regards,

    Manoj

  • Lee,

    Major code modifications have been highlighted below. Hope this helps.

    #define BURST         2 // 2 words / burst
    #define TRANSFER    5 // 5 bursts / transfer

    uint16_t compareConfigs[TRANSFER*BURST] =
    {
       //CMPA   ,   CMPB
       32U      ,   30U
       32U      ,   30U
       32U      ,   30U
       12U      ,   50U
       32U      ,   30U
    }


    //BURST_SIZE               = 2 // 2 words / burst
    //SRC_BURST_STEP    = 1 // SRC_ADDR_ACTIVE += 1
    //DST_BURST_STEP    = 2 // DST_ADDR_ACTIVE += 2

    DMA_configAddresses(DMA_CH5_BASE, (uint16_t *)(myEPWM1_BASE + EPWM_O_CMPA), compareConfigs);

    DMA_configBurst(DMA_CH5_BASE,BURST,1,2);

    //SRC_WRAP_SIZE       = 1 // After 1 burst wrap around the address
    //SRC_WRAP_STEP      = 2 // SRC_BEG_ADDR_ACTIVE += 2
    //DST_WRAP_SIZE        = 1 // After 1 burst wrap around the address
    //DST_WRAP_STEP       = 0 // DST_BEG_ADDR_ACTIVE += 0

    DMA_configWrap(DMA_CH5_BASE, 1, 2, 1, 0);

    //TRANSFER_SIZE            = 5     // 5 bursts / transfer
    //SRC_TRANSFER_STEP = -10 // SRC_ADDR_ACTIVE += -10
    //DST_TRANSFER_STEP = 0    // DST_ADDR_ACTIVE += 0

    DMA_configTransfer(DMA_CH5_BASE,TRANSFER,-10,0);

    Make sure to enable continuous mode and one-shot mode disabled.

    Regards,

    Manoj

  • Was your question answered? Can I close this thread?

    Regards,

    Manoj