Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add a "dead time" PWM function & PWM frequency halves after power cycle #1

Closed
nikowot opened this issue Mar 18, 2023 · 5 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@nikowot
Copy link

nikowot commented Mar 18, 2023

Hello Sam,
Thank you for making your library available.
Please add a PWM "dead time" function and define a complementary signal to the library: "TimerFour".

@nikowot
Copy link
Author

nikowot commented Apr 28, 2023

I have encountered the problem of generating half the frequency at the output as soon as the power is switched on.
After performing a manual RESET, the frequency is correct.

@samverstraete
Copy link
Owner

Hi @nikowot

Not sure how this could happen. I would check the datasheet of the ATMega and see if there's another peripheral using the same clock source as timer 4.

Otherwise, this code is basically a copy of Paul Stoffregens TimerThree code, maybe you can check there if someone had a similar problem with timer 3...

@nikowot
Copy link
Author

nikowot commented Apr 29, 2023 via email

@samverstraete samverstraete self-assigned this Apr 29, 2023
@samverstraete samverstraete added bug Something isn't working enhancement New feature or request labels Apr 29, 2023
samverstraete added a commit that referenced this issue Apr 29, 2023
…, not sure why, but force the PLL in the correct position (96Mhz)
@samverstraete
Copy link
Owner

Looks like something changes the PLL config after a power cycle. I've changed to code to force the PLL to the right config (96Mhz) when setPeriod is called (or initialize).
Fixed in release v1.0.1

@samverstraete samverstraete changed the title Please add a "dead time" PWM function Please add a "dead time" PWM function & PWM frequency halves after power cycle Apr 29, 2023
@nikowot
Copy link
Author

nikowot commented May 3, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants