Skip to content
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 PWM driver of RZ/A1 #9952

Merged
merged 5 commits into from Mar 17, 2019

Conversation

Projects
None yet
6 participants
@d-kato
Copy link
Contributor

d-kato commented Mar 6, 2019

Description

Fixed a bug that caused noise when the duty was 0% and 100%.
And added pwm pin for GR-LYCHEE.

Pull request type

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

Reviewers

Release Notes

@ciarmcom ciarmcom requested review from toyowata and ARMmbed/mbed-os-maintainers Mar 6, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

ciarmcom commented Mar 6, 2019

@d-kato, thank you for your changes.
@toyowata @ARMmbed/mbed-os-maintainers please review.

@toyowata
Copy link
Contributor

toyowata left a comment

The code looks good to me, but need a bit detail commit message:
ff32b41

E.g. description of the bug and how/what fix this.

@cmonr cmonr added needs: work and removed needs: review labels Mar 6, 2019

@cmonr
Copy link
Contributor

cmonr left a comment

Please split the fix, pin addition, and code refactoring into seperate commits.

PR content looks fine.

@d-kato d-kato force-pushed the d-kato:rza1xx_pwm branch to c5b01bf Mar 7, 2019


// Counter Restart
if ((MTU2TSTR & tmp_tstr_st) == 0) {
MTU2TSTR |= tmp_tstr_st;
}

This comment has been minimized.

@d-kato

d-kato Mar 7, 2019

Author Contributor

By the TIOR register, the output is fixed to Low when the duty is 0%, and fixed to Hi when 100%.
To change the TIOR register, the counter is temporarily stopped.

@d-kato

This comment has been minimized.

Copy link
Contributor Author

d-kato commented Mar 7, 2019

I splitted the commit.

@cmonr

cmonr approved these changes Mar 7, 2019

Copy link
Contributor

cmonr left a comment

🎉

Thank you! The split makes reviewing considerably easier!

@d-kato

This comment has been minimized.

Copy link
Contributor Author

d-kato commented Mar 11, 2019

I'm sorry. As an additional change, I changed condition statement of writing function.

@cmonr

This comment has been minimized.

Copy link
Contributor

cmonr commented Mar 13, 2019

@d-kato No worries. You at least let us know about it, which is appreciated.

@d-kato

This comment has been minimized.

Copy link
Contributor Author

d-kato commented Mar 14, 2019

@cmonr, I do not want to change the value of the TIOR register frequently.
As the method, originally, it was judged from the values of period and pulse set last. However, with this method, it is considered that the relationship between period and pulse may be broken due to a calculation error when the "pwmout_period_us()" is executed.
So I decided to change the TIOR register if it was not the value I wanted to set.

@0xc0170

This comment has been minimized.

Copy link
Member

0xc0170 commented Mar 15, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

mbed-ci commented Mar 16, 2019

Test run: SUCCESS

Summary: 13 of 13 test jobs passed
Build number : 1
Build artifacts

@cmonr cmonr added ready for merge and removed needs: CI labels Mar 16, 2019

cmonr added a commit to cmonr/mbed-os that referenced this pull request Mar 16, 2019

cmonr added a commit to cmonr/mbed-os that referenced this pull request Mar 16, 2019

@cmonr cmonr merged commit a637551 into ARMmbed:master Mar 17, 2019

28 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARMC5 Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR8 Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARMC5 Success
Details
jenkins-ci/mbed2-build-ARMC6 Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR8 Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 9918 cycles (-104 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details

@cmonr cmonr removed the ready for merge label Mar 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.