Skip to content

[LPC812] Conflict set/clear event for PwmOut #1757

Closed
@toyowata

Description

@toyowata

Problem

When PwmOut::write() is called with 0 and 0.5 parameter by toggling, output signal level wrongly tied to high level often by write(0).
Original report is here.

Test code

#include "mbed.h"

PwmOut pwm1(D2); // P0_6

int main()
{
    pwm1.period_us(26);
    pwm1.write(0);

    while(1) {
        pwm1.write(0.5); // 50% duty
        wait(1);
        pwm1.write(0);   // should be low level
        wait(1);
    }
}

Signal snapshoot

Image of PwmOut

This is due to the conflict of set/clear event is happened for SCT output.
I have fixed this defect and will make pull-request after some more testing.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions