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

Dual outputs and locked PWM on the same EHRPWM module #54

Open
Aidan275 opened this issue Oct 4, 2018 · 2 comments
Open

Dual outputs and locked PWM on the same EHRPWM module #54

Aidan275 opened this issue Oct 4, 2018 · 2 comments

Comments

@Aidan275
Copy link

Aidan275 commented Oct 4, 2018

Hi,

When writing 1 using analogWrite to a PWM pin, the associated pin that is connected on the same EHRPWM module also outputs 1.

Trying to write 0 to this associated pin doesn't change the output and it can only be set to 0 if we use analogWrite to set it to 1 first.

The example below will result in P9_14 and P9_16 both outputting 1.

const b = require('bonescript');
b.pinMode('P9_14', b.ANALOG_OUTPUT);
b.analogWrite('P9_14', 1, 2000);

I've only tested the following pins so far and they all appear to have the same issue.

  • P8_13 and P8_19
  • P9_14 and P9_16
  • P9_21 and P9_22

I found a similar issue already posted here #15 but we are unable to use the suggested workaround of using pins that aren't connected on same EHRPWM module.

Thanks,
Aidan

@Aidan275
Copy link
Author

Aidan275 commented Oct 9, 2018

Hi @jadonk,

You mentioned in #15 that you know how to fix this issue, I know you must be busy but if you could please give me any info on the cause of the issue and point me in the right direction so that I can attempt to fix it I would really appreciate it.

Thanks,
Aidan

@riptho
Copy link

riptho commented Nov 18, 2018

I am also having this issue. Please advise.

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

2 participants