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

Enables PWM for the nRF9160 #311

Merged
merged 1 commit into from
May 14, 2021
Merged

Enables PWM for the nRF9160 #311

merged 1 commit into from
May 14, 2021

Conversation

huntc
Copy link
Contributor

@huntc huntc commented May 6, 2021

Without it, we can't have blinky on the Thingy:91 as its RGB LEDs require PWM!

This PR assumes just unsecured peripheral access for now.

I've also included a new pwm-blinky-demo and ensure that this and the original pwm-demo are included with the xtask tests. Additionally, the pwm-blinky-demo is tested for the nRF9160 target.

Tested on an nRF9160-dk via the probe-rs/embed tool. The result from cargo embed:

image

cc @kalkyl

@huntc huntc marked this pull request as draft May 6, 2021 11:02
@huntc huntc force-pushed the enable-pwm branch 2 times, most recently from 411e000 to 500f660 Compare May 10, 2021 08:18
@huntc huntc marked this pull request as ready for review May 12, 2021 01:48
Without it, we can't have blinky as its RGB LEDs require PWM!

This PR assumes unsecured peripheral access. I'm thinking that in future we might introduce a "Secured" feature perhaps.
@huntc huntc mentioned this pull request May 14, 2021
@jonathanpallant
Copy link
Member

Works on my nRF9160-DK. It might be worth a second PR just confirming which boards this examples are designed to run on.

@jonathanpallant
Copy link
Member

I also hacked it to blink at varying intensity levels to check the PWM worked correctly. We should note that on an nRF9160-DK maximum duty turns the LED off, and 0 turns the LED on (they must have an inverter in there, or they switch the ground not the Vcc).

@jonathanpallant
Copy link
Member

@bors r+

@jonas-schievink
Copy link
Contributor

bors r=jonathanpallant

@bors
Copy link
Contributor

bors bot commented May 14, 2021

Build succeeded:

@bors bors bot merged commit ed5d87d into nrf-rs:master May 14, 2021
@huntc huntc deleted the enable-pwm branch May 14, 2021 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants