arduino / arduino/ArduinoCore-mbed

mbed::PwmOut 2.2.0 -> 2.3.1 with Portenta H7

Open
#293 7 comments 0 reactions 0 assignees View on GitHub
bug Portenta
Dominant language
C
Stars
411
Forks
225
PR merge metrics
No merged PRs in 30d

Description

**_### Problem with `mbed::PwmOut` with Portenta H7_**

**IDE**: Arduino IDE 1.8.15

**Board**: Portenta H7 and Portenta Breakout board

`mbed::PwmOut` was working perfectly in ArduinoCore-mbed `2.2.0` but since update `2.3.1` it is not possible to make two PWM channels work simultaneously. Not yet tested with more channels.

Test sketch:

```
#include "mbed.h"

using namespace mbed;

PwmOut pwm_a(PA_8);
PwmOut pwm_b(PC_6);

void setup() {

pwm_a.period_us(5000);
pwm_a.pulsewidth_us(50);

pwm_b.period_us(5000);
pwm_b.pulsewidth_us(50);

}

void loop() {

}
```

Output results with version `2.2.0` in pins PWM0 (yellow) and PWM1 (blue):

![NewFile1](https://user-images.githubusercontent.com/62314876/126767608-b12459eb-d309-472e-ad17-83c7d6ae3cbd.png)

![NewFile2](https://user-images.githubusercontent.com/62314876/126768042-0738c7fe-343d-4c30-b2f5-53124279cfb6.png)

Output results with version `2.3.1` in pins PWM0 (yellow) and PWM1 (blue):

![NewFile3](https://user-images.githubusercontent.com/62314876/126768103-b9cbe38e-3581-4e6b-a0a6-56e4ab41dc0d.png)

As we can see PWM0 channel is not generating the setted pulse.

Please let me know if you need more information or help.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the supplied Portenta H7 sketch and reproduce the two-channel output through mbed::PwmOut on PA_8 and PC_6. Compare ArduinoCore-mbed versions 2.2.0 and 2.3.1, then determine why PWM0 no longer produces the configured pulse and verify both channels against the earlier result.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.