Skip to content

Should Multiple PWM Outputs Function Concurrently? #557

@microPaul

Description

@microPaul

I seem to continue to be PWM challenged.

I'm using a homebrew board with an AVR64DB64. From the documentation on the DxCore GitHub page it looks like TCA0 will provide six PWM outputs. And I do get six PWM outputs on Port D (I change the value of PORTMUX.TCAROUTEA to 0x03). My "problem" is that I only can get one of the PWM outputs to work at a time. If I have multiple AnalogWrite statements, like:

    analogWrite(PIN_PD1, 32);
    analogWrite(PIN_PD2, 128);
    analogWrite(PIN_PD3, 190);  
    analogWrite(PIN_PD4, 45);     
    analogWrite(PIN_PD5, 99); 

then only the last statement is effective. Is this the way PWM is supposed to work? Only one TCA0 PWM output active at a time? I thought (or was hoping) that I could get six concurrently operating PWM outputs from one TCA timer. Please let me know if the one-at-a-time PWM output that I'm seeing is the intended functionality. I'm using the 1.5.11 version of the DxCore.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBehavior of core does not match API or reasonable expectationsCRITICALSevere bug which is top priority to fixPWM Issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions