-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix EFM32 pwmout hal function pwmout_period #7993
Conversation
In pwmout_period() is a check for changed values, which is not working because of a wrongly used bitmask. This is fixed now.
lgtm 👍 |
quick question: when will the ci tests be scheduled? ;) |
/morph build |
Build : SUCCESSBuild number : 3083 Triggering tests/morph test |
Test : SUCCESSBuild number : 2871 |
Exporter Build : FAILUREBuild number : 2693 |
We will retrigger exporter later /morph mbed2-build |
/morph export-build |
Exporter Build : SUCCESSBuild number : 2723 |
@MikeDK Right now! |
(The delay has been caused by the 5.10 release) |
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