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.
Hello:
i have a question with my pwm switch tactics. i want to make a high bandwidth motor controller(about 2000HZ), so i change the shadow mode to immediate mode.
In this way, my pwm limit compared value is 4095, but my pwm always cann't switch when compared singal at higher value but not have bigger than limit value.
i have setting EPWM ->CMPCTL, turn on immediate mode and turn off shadow mode, this way is reduced a cycle delay for my current interrupt, i have a file in this topic, i cann't find my mistake.
what is my key point to setting immediate mode not only CMPCTL?
thanks
Hi Shambhu,
One option is to use CMPC or CMPD events for interrupt generation - instead of checking TBCNT value in software.
Ex: Configure CMPC reg to generate an interrupt at an appropriate time (depending on cycles needed for reg updates and calculations etc.). This event will always generate interrupt when needed giving you sufficient time for reg. updates etc.
-Bharathi.