Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed the week of November 23.

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.

How to set ISR , sampling and PWM Frequency

Hi,

How should I set my ISR frequency relative to PWM frequency? 

Also, where should the sampling frequency be relative to the ISR and PWM frequency?

If anyone can give some insight or point me somewhere to get started, that'd be really great. 

Thanks !

 

  • This is just from my recent project but the ISR frequency for me happens every time and triggered by the PWM itself.

    The sampling frequency (which i assume is the ADC sampling frequency) is again set by the PWM mainly for the fact that the conversion process can be started easily by the PWM.

    When it is set-up this way, generally the PWM will will trigger the PWM ISR and start the ADC conversion. The PWM ISR you can do something in, or you can wait for the ADC ISR to do something in, or you could use both.

    If you need to keep updating the duty cycle of the PWM, you can use the shadow registers and in the PWM ISR update the duty cycle for the next switching period. 

  • Thanks! I will look into it.