Skip to content

DigitalWrite/TurnOffPWM interferes with alternative Timers #75

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

Open
bridystone opened this issue Jul 6, 2020 · 0 comments
Open

DigitalWrite/TurnOffPWM interferes with alternative Timers #75

bridystone opened this issue Jul 6, 2020 · 0 comments

Comments

@bridystone
Copy link

bridystone commented Jul 6, 2020

I have a program that makes heavy use of timers with PWM.
TCA-Split Timer + TCB 0/1 timers
I've changed sometimes the default PORTMUX (i.e. for the TCB timers)

When I now use a PIN with default PWM functionality (i.e. PIN3) it disables the corresponding TCB timer.
first I've changed the PINs, but now it turns out, that I quite use every available PIN on the Nano Every.

I now changed the core library to not turnoff PWM, by changing the const digital_pin_timer.
However would like to have it still in standard mode.

I've also tried to overwrite the const static digital_pin_timer with NOT_ON_TIMER (by pointer usage)
However this didn't work.

SO - do you have an idea how to prevent the timers to be disabled, when using them on different PORTMUX?
Is the only way to additionally check in the DigitalWrite(or TurnOffPWM), if the PORTMUX is the default one?

@bridystone bridystone changed the title DigitalWrite/TurnOffPWM interferres DigitalWrite/TurnOffPWM interferes with alternative Timers Jul 6, 2020
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

No branches or pull requests

1 participant