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.

CC2650 - PWM missing UDMA data

Other Parts Discussed in Thread: CC2650

I've configured a :

* PWM timer that send events on rising edge

* UDMA is triggered on these events, each time, PWM match value is written to timer register. A ram buffer of size n contains these values. At end, an interrupt is raised when udma transfer is finished.

* generated signal is recorded using a logic analyser

Here is first setup :

UDMA buffer is :

static uint32_t _dataToTransfer[] = {20, 40, 20, 40, 20, 40};

Timer load value is 120, it means a 2.52µs period according to logic analyzer (I'm running a cc2650 @48MHz).

Here is resulting signal :

As you can see, we can find that buffer values have been written to PWM match counter on each PWM period. After the 6 transfers you can see some additional period, I thinkl it is because of delay introduced in UDMA transfer done interrupt (UDMA transfer is stopped but not timer, its match value is latest UDMA transferred last value 40)

Now I'm doing same test but with a smaller PWM period - 60 count ~ 1.28µs

As you can see, in some cases, I get a signal at high level during PWM period (1.28µs) + Next PWM High time (0.4µs) = 1.680µs

In some cases, PWM match value (from UDMA) is lost and signal stays high.

Does that mean that below a given PWM period, timer cannot load UDMA match value and do not take any match value (neither old one nor new one being loaded by UDMA)?

Lah

  • Hi,

    We are looking into this now. Will get back to you asap. Thanks for your patience.
  • Hi Lah,

    Sorry for the delayed response. It's expected to see some delay when using interrupt call back. What you can do (if your resource allows) is starting 2 timer at the same time and then the 2nd timer trigger DMA on match as well but the transfer destination would be the CTL register.

    I have tried this method and it's doable to stop the timer right away.

    Regarding the 2nd issue you have posted, we are looking into it now, and hopefully will be able to provide you feedback asap.

  • Thanks for your help, in order to be sure, in this fix you use two timers of a single GPT :
    * TimerNA : PWM timer, its rising edges cause UDMA transfer (using TimerNA UDMA channel) to its match value
    * TimerNB : PWM timer, its rising edges cause UDMA transfer (using TimerNB UDMA channel)on CTL, during transfer it keeps timerNA and timerNB enabled, at last rising edge it disables TimerNA and TimerNB using GPT CTL register.

    Regards
    Lah
  • Yes, you are correct!