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.

[ TMS320F28335 - motor control - interruptions and timers ]

Other Parts Discussed in Thread: TMS320F28335

Hello,

First, I am a beginner in DSP implementation control. I am actually using a DSP Board with TMS320F28335 in order to control motor. In my original project, the interruption period is fixed by the timer 1 of the DSP and the generation of the PWM frequency too.

I would prefer use timer 2 to generate PWM frequency and separate the interruption period to the PWM period generation. In fact I would like something like that :

 

So I have some questions according to this matter. How can I use another Timer ? Where can I find it ? How set up the period of a timer ? ...

My real aim is to use a randoom PWM frequency (between 5kHz and 20kHz). So I originaly wanted to use an rand() function (in C language) in my interrupt service routine (ISR), which compute the enslavement of the motor. So at each interruption of Timer 1, I would like to generate another PWM frequency that will correspond to generate another period of timer 2.

I would be very gratefull if you could help me in this matter.

Thank you in advance.

Malory