How can I modify the MCPWM prescale value without modifying the library? #8258
Unanswered
Prithul0218
asked this question in
Q&A
Replies: 1 comment
-
Here's my code: https://pastebin.com/eaPyH5F5 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm currently working on a buck-boost converter that requires 100kHz complementary PWM frequencies with at least 8-10 bits of resolution. I'm using the MCPWM in Arduino to generate the PWM signals, but I'm encountering some issues with the PWM frequency and resolution.
I've noticed that the library sets the MCPWM clock prescaler to a fixed value (MCPWM_CLK_PRESCL) when initializing the PWM signal. However, I need to achieve a higher PWM frequency output while maintaining a good PWM resolution, and I believe that modifying the prescale value could help me achieve that.
My question is, how can I modify the MCPWM prescale value without modifying the library? I've searched online for a solution for hours, but I haven't found any clear answers. Here is my code and at 50kHz, it works pretty well but at 100kHz, I only get 3 bit resolution. I am using
mcpwm_timer_set_resolution
but no luck. https://pastebin.com/eaPyH5F5Any help or guidance would be greatly appreciated. Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions