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

STM32F1 RTC : save values in register #8213

Merged
merged 1 commit into from Oct 10, 2018
Merged

Conversation

jeromecoutant
Copy link
Collaborator

@jeromecoutant 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
Copy link
Collaborator Author

ST_INTERNAL_REF 53639

@jeromecoutant
Copy link
Collaborator Author

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
Copy link
Contributor

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

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

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

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
Copy link
Collaborator Author

Commit updated

@jeromecoutant
Copy link
Collaborator Author

@0xc0170 please start CI
Thx

@0xc0170
Copy link
Contributor

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
Copy link
Contributor

adbridge commented Oct 9, 2018

/morph build

@mbed-ci
Copy link

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
Copy link

mbed-ci commented Oct 9, 2018

@mbed-ci
Copy link

mbed-ci commented Oct 9, 2018

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 9, 2018

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

@OPpuolitaival
Copy link
Contributor

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

@OPpuolitaival
Copy link
Contributor

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

@cmonr cmonr merged commit ebff1e5 into ARMmbed:master Oct 10, 2018
@jeromecoutant jeromecoutant deleted the PR_RTC_F1 branch October 11, 2018 07:44
@Arjun765
Copy link

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

@jeromecoutant
Copy link
Collaborator Author

Hi
Please open a new issue with details if needed
Thx

@Arjun765
Copy link

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

@jeromecoutant
Copy link
Collaborator Author

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants