-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
NRF PWM pin default state is high #67179
Comments
Hi @siddhantmodi! We appreciate you submitting your first issue for our open-source project. 🌟 Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙 |
I have switched over to using the
I can avoid that initial state of the pin being high. But setting the polarity to NORMAL for the hardware |
That happens because the overlay you are using is incorrect. You are altering the |
@anangl Thank you for your attention to this problem. I thought that by redefining If I set up the
Here, the
Thank you! |
@anangl I was able to carve some time out today and test it - I can confirm that what you said is correct. I created the two
and that solved the issue for me. I am going to close this ticket. |
I am not able to close it - but it is ready to be closed. Thank you for your help. |
Describe the bug
I've set up a custom pin for PWM on my nrf52840dk board - the first thing the main function does is set up a 50kHz signal at a 50% duty cycle. However, the problem is that the pin is getting initialized as HIGH before the code in
main
even starts running. Line 239 ofzephyr/drivers/pwm/pwm_nrfx.c
in thepwm_nrfx_init
function is the moment where the pin goes HIGH:I stepped into the code but couldn't figure out what exact config is determining the initial state.
Please also mention any information which could help others to understand
the problem you're facing:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Either the pin should be LOW or maybe have a config somewhere that dictates what the state should be?
Impact
Annoyance because I can get around this by using the
nrfx_pwm
API but this affects the native_sim application from building.Logs and console output
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: