Skip to content

STM32 LPT optimisation #5862

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
merged 1 commit into from
Jan 18, 2018
Merged

STM32 LPT optimisation #5862

merged 1 commit into from
Jan 18, 2018

Conversation

jeromecoutant
Copy link
Collaborator

Description

For each low power timer/ticker start, lp_ticker_read function is called 3 or 4 times.
lp_ticker_read duration was around 58us.
It is now reduced to 9us.

Hope it will solve #5790

Status

READY

@@ -123,6 +124,10 @@ void rtc_init(void)
RtcHandle.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN;
#endif /* TARGET_STM32F1 */

#if DEVICE_LOWPOWERTIMER && !MBED_CONF_TARGET_LOWPOWERTIMER_LPTIM
lp_TickPeriod_us = 2048 * 1000000 / RtcHandle.Init.SynchPrediv;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is 2048 coming from ? would it make sense to have a macro here with name that would explain ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thx

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 16, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jan 16, 2018

Build : SUCCESS

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

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@mbed-ci
Copy link

mbed-ci commented Jan 16, 2018

@mbed-ci
Copy link

mbed-ci commented Jan 16, 2018

@0xc0170 0xc0170 merged commit c24eb5b into ARMmbed:master Jan 18, 2018
@jeromecoutant jeromecoutant deleted the PR_LPT_ISSUE branch January 18, 2018 13:00
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.

4 participants