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.

Queuing Up PWM Pulse Widths on TMS320F28027



Is there a way to store an array of PWM widths that will automatically be cycled through without having to interrupt and update the PWM each cycle?

 

Thanks,

 

- Chris

  • you don't have to interrupt, you can load the shadow registers at anytime during the cycle, and they will take affect the next period.

    but no, there is not a set array that will autoload.

    we are looking at this feature enhancement for next gen devices (load all at once, load from a pointer)

    based on your other posts I'm guessing you are doing something very high frequency, huh?

     

  • Well, "high" is a relative term :-)

     

    I'm currently doing two designs, one at 500kHz and one at 1MHz. However, I have a fair amount of processing I'm trying to do at around 50kHz, which is why I don't want to waste 10 or 20 times interrupt request plus service clock cycles every 50kHz. That time could be used for better filtering, especially with the DMAC giving me two taps per cycle.

     

    Right now, I have to interrupt every time the higher switch rate needs a new sample, i.e. at either 500kHz or 1MHz. It would be nice to just queue up an array of 10 or 20 output values and just let the PWM cycle through them at the appropriate times. The other nice thing about this is it would solve the blanking question I posted in my other thread as you could just load a period of 0 every nth cycle.

    - Chris

     

     

  • Yes, that's "relatively high" :)

    Good idea on the array load, second time I've heard that in the last few weeks. I'm actually surprised we haven't gotten that feedback before.

    I think adding more CMP events in a period, and setting up some sort of pointer for the shadow registers to autoload from will make the PWM modules even more flexible.