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.

Using EDMA to access EHRPWM

Other Parts Discussed in Thread: OMAPL138

dear E2E community..

is it possible to use EDMA for accessing EHRPWM peripheral ?

in my current project, i have problem with machine cycles.. if i used CPU directly to access EHRPWM such as read the register and write into register, it can consume about 15 machine cycles..

therefore my idea is to utilize the EDMA since i read about the EDMA capabilities to do parallel processing with the CPU..

if it is possible, please share the supporting documentation about accessing EHRPWM via EDMA..

thank you

regards,

franz

  • Hi Franz,
    No, we don't have a EDMA channel for eHPRPWM peripheral and also it doesn't have periheral DMA too.
    Refer to the chapter 6.9.1 of OMAPL138 data sheet.
    BTW, what is your processor ?
  • Hi,

    Thanks for your post.

    EHRPWM peripheral is basically used to generate complex pulse width waveforms with time resolution capabilities and as per design, it won't take much CPU overhead/intervention. So, effective programming wouldn't take much CPU machine cycles and it can be highly programmable and very flexible to minimize CPU load.

    Unfortunately, you do not have provision to trigger EDMA events to generate interrupts and both ehrpwm0 & ehrpwm1 output channels do have feasibility only to generate CPU interrupts which are PWM timing interrupts and tripzone interrupts.

    For more details, please refer EHRPWM module from omapl138 TRM as below:

    http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    -------------------------------------------------------------------------------------------------------

  • hi titus..

    thx for your reply..
    i'm using LCDK C6748..
    hm.. if so, do you have any suggestion how to reduce the machine cycles?
    since i have 1 read register command and 3 write into register command..
    i need to update the PWM width on every period, and need to set PWM period as low as possible..

    thank you
  • Hi sivaraj..

    Thx for your answer..

    the problem is that i need a very fast pwm period.. i want a pwm period of minimum 20MHz.. which means if using max clock of 456MHz, it is only about 20 machine cycles length...

    Then i need to calculate the next pulse width within less than 20 cycles..

    I made the code using asm and making as much parallel instruction as possible..

    it can result about 20 cycles.. but the problem is that instruction that accessing ehrpwm block (STH and LDH) actually can consume more than 10 cycles itself..

    then the cpu will wait for more than 10 cycles before it continues into the next instruction..

    this waste too much machine cycles and cannot achieve my target (pwm period 20MHz)..

    Thats why i want to use edma to reduce the "waiting time" of peripheral access..

    my aim is to calculate pwm width and update the pulse width register within 20 cycles repeatedly..

    Do you think it is possible to utilize the ehrpwm at this frequency?

    Thank you

  • Hi,

    PWM is highly flexible and can be programmable to operate this frequency.

    Yes it could be possible.

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    -------------------------------------------------------------------------------------------------------