We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear friends,
I have been developing a program for a physiotherapy device and I needed to use motor control PWM as an standard PWM generator. In this project I need to change the MCPWM mode from center aligned mode to edge aligned mode and vice versa for several times. (user defines it using a C# program and UART unit). When the mode is changed several times, the MCTIM register (MCPWM timer register) starts counting down from its maximum value instead of being incremented on each clock cycle. I have tried everything, but it won't work.
Do you have any idea what I should do?
If you need the part of code related to this issue, please let me know and I will upload it.
Thanks in advance for your help
Don't you think you should start with ordinary debugging?
Review your code. And review the content of all related registers before - and after - you get the problem?