Skip to content

Fix EFM32 pwmout hal function pwmout_period #7993

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

Merged

Conversation

MikeDK
Copy link
Contributor

@MikeDK MikeDK commented Sep 5, 2018

Description

In pwmout_period() of the EFM32 pwmout_api.c is a check for changed values, which is not working correctly because of a wrongly used bitmask. This has been fixed.

With the wrong bitmask, it was not possible to do things like...:

pwmout_init(PB11);
pwmout_period_us(100);
--- use of pwm channel ---
pwm_free();
--- we want to use another pin now ---
pwmout_init(PB12);
pwmout_period_us(100);

The Problem occurs on the second call of pwmout_period_us() ... the check for changed values would evaluate to TRUE, and the frequency would not be changed to 10kHz ... instead the standard frequency of 50Hz would be effective.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change

In pwmout_period() is a check for changed values, which is not working because of a wrongly used bitmask. This is fixed now.
@0xc0170 0xc0170 requested a review from a team September 5, 2018 10:58
@stevew817
Copy link
Contributor

lgtm 👍

@MikeDK
Copy link
Contributor Author

MikeDK commented Sep 11, 2018

quick question: when will the ci tests be scheduled? ;)

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 17, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Sep 17, 2018

Build : SUCCESS

Build number : 3083
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7993/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Sep 17, 2018

@mbed-ci
Copy link

mbed-ci commented Sep 17, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 19, 2018

We will retrigger exporter later

/morph mbed2-build

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 20, 2018

/morph export-build

@mbed-ci
Copy link

mbed-ci commented Sep 20, 2018

@cmonr
Copy link
Contributor

cmonr commented Sep 20, 2018

quick question: when will the ci tests be scheduled? ;)

@MikeDK Right now!

@cmonr
Copy link
Contributor

cmonr commented Sep 20, 2018

(The delay has been caused by the 5.10 release)

@cmonr cmonr merged commit 7d54df6 into ARMmbed:master Sep 20, 2018
@cmonr cmonr removed the needs: CI label Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants