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

STM32F1 RTC : save values in register #8213

Merged
merged 1 commit into from Oct 10, 2018

Conversation

Projects
None yet
8 participants
@jeromecoutant
Contributor

jeromecoutant commented Sep 21, 2018

Description

RTC drivers for STM32F1 family is quite different than other families.
Date feature is currently managed only by SW.

With this patch, RTC read and write has been quite simplified,
and values are now saved into register.

Fixes #8191

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change
@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Sep 21, 2018

ST_INTERNAL_REF 53639

@bcostm

bcostm approved these changes Sep 21, 2018

@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Sep 21, 2018

Test result unchanged:

target platform_name test suite result elapsed_time (sec) copy_method
NUCLEO_F103RB-ARM NUCLEO_F103RB tests-mbed_drivers-rtc OK 29.95 default
NUCLEO_F103RB-ARM NUCLEO_F103RB tests-mbed_hal-rtc OK 49.96 default
NUCLEO_F103RB-ARM NUCLEO_F103RB tests-mbed_hal-rtc_reset OK 19.62 default
NUCLEO_F103RB-ARM NUCLEO_F103RB tests-mbed_hal-rtc_time OK 16.81 default
NUCLEO_F103RB-ARM NUCLEO_F103RB tests-mbed_hal-rtc_time_conv OK 34.81 default
NUCLEO_L476RG-ARM NUCLEO_L476RG tests-mbed_drivers-rtc OK 29.16 default
NUCLEO_L476RG-ARM NUCLEO_L476RG tests-mbed_hal-rtc OK 56.99 default
NUCLEO_L476RG-ARM NUCLEO_L476RG tests-mbed_hal-rtc_reset OK 18.63 default
NUCLEO_L476RG-ARM NUCLEO_L476RG tests-mbed_hal-rtc_time OK 15.43 default
NUCLEO_L476RG-ARM NUCLEO_L476RG tests-mbed_hal-rtc_time_conv OK 30.93 default
@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 25, 2018

Looks fine to me. Just the commit is less descriptive compare to the description here (can you add description from here there? )

Will move to needs: CI after update

@0xc0170

Commit should state what this fixes (see my comment above)

@0xc0170 0xc0170 added needs: work and removed needs: review labels Sep 25, 2018

STM32F1 RTC : save values in register
Date is managed only by SW
  within CUBE functions HAL_RTC_GetDate and HAL_RTC_SetDate.
They are then replaced by functions that saved counters in HW registers.
RTC_ReadTimeCounter and RTC_WriteTimeCounter are then added to the ST API.

@jeromecoutant jeromecoutant force-pushed the jeromecoutant:PR_RTC_F1 branch from 4e8f85c to e8d32ca Sep 25, 2018

@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Sep 25, 2018

Commit updated

@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Oct 8, 2018

@0xc0170 please start CI
Thx

@0xc0170

0xc0170 approved these changes Oct 8, 2018

@0xc0170 0xc0170 added needs: CI and removed needs: work labels Oct 8, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 8, 2018

@jeromecoutant I updated my review, and this will be in the queue for CI now (we are producing 5.10.1 RC, so once that one is done, we will start filling up the queue).

@adbridge

This comment has been minimized.

Contributor

adbridge commented Oct 9, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 9, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 9, 2018

@OPpuolitaival I can't restart unittest anymore, can you please help?

@OPpuolitaival

This comment has been minimized.

Contributor

OPpuolitaival commented Oct 10, 2018

@0xc0170 you can always trigger whole pipeline as restarting "continuous-integration/jenkins/pr-head"

@OPpuolitaival

This comment has been minimized.

Contributor

OPpuolitaival commented Oct 10, 2018

@0xc0170 the root cause was refactoring the pipeline script.. I take care of this

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Oct 10, 2018

@cmonr cmonr merged commit ebff1e5 into ARMmbed:master Oct 10, 2018

17 checks passed

ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/cloud_client_smoke_test Success
Details
jenkins-ci/jenkins-ci/cloud_client_smoke_test Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Passed, 612 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9161 cycles (+85 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8372B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@cmonr cmonr removed the ready for merge label Oct 10, 2018

@jeromecoutant jeromecoutant deleted the jeromecoutant:PR_RTC_F1 branch Oct 11, 2018

@Arjun765

This comment has been minimized.

Arjun765 commented Oct 12, 2018

Time still gets reset, if i call HAL_RTC_GetTime. I need to set RTC wakeup.

@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Oct 12, 2018

Hi
Please open a new issue with details if needed
Thx

@Arjun765

This comment has been minimized.

Arjun765 commented Oct 12, 2018

But its not related to Mbed, calling HAL_RTC_SetAlarm_IT corrupts the time. where should i report it?

@jeromecoutant

This comment has been minimized.

Contributor

jeromecoutant commented Oct 12, 2018

We need to check this alarm feature now that RTC register access is different...
The best way to proceed is to open a new issue with a small program that reproduces the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment