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

STM32: RTC: Call irq_handler whenever interrupt fires #5289

Merged
merged 1 commit into from Oct 13, 2017

Conversation

Projects
None yet
4 participants
@LMESTM
Contributor

LMESTM commented Oct 10, 2017

Description

This is a FIX for #5159.

lp_ticker driver is the known registered user of RTC handler API.

In case, a lp_ticker is set in the past, the lp_ticker_fire_interrupt
will be called which itself sets the RTC interrupt as pending by calling
NVIC_SetPendingIRQ(RTC_WKUP_IRQn). This all happens without actual
programing of the RTC wake-up.

As a result the RTC HW and corresponding HAL layer doesn't expect an
interrupt to happen and will not call HAL_RTCEx_WakeUpTimerEventCallback.

To sove this situation, we will not use HAL_RTCEx_WakeUpTimerEventCallback
weak definition but rather call handler whenever an RTC interrupt fires.

Notes:

  • Pull requests will not be accepted until the submitter has agreed to the contributer agreement.
  • This is just a template, so feel free to use/remove the unnecessary things

Status

READY

Todos

  • Tests
+-------------------+---------------+-------------------------------+--------+--------------------+-------------+
| target            | platform_name | test suite                    | result | elapsed_time (sec) | copy_method |
+-------------------+---------------+-------------------------------+--------+--------------------+-------------+
| NUCLEO_F091RC-ARM | NUCLEO_F091RC | tests-mbed_drivers-lp_timeout | OK     | 212.08             | default     |
| NUCLEO_F091RC-ARM | NUCLEO_F091RC | tests-mbed_drivers-rtc        | OK     | 212.85             | default     |
| NUCLEO_F091RC-ARM | NUCLEO_F091RC | tests-mbed_hal-lp_ticker      | OK     | 211.02             | default     |
| NUCLEO_F091RC-ARM | NUCLEO_F091RC | tests-mbed_hal-lp_us_tickers  | OK     | 204.27             | default     |
| NUCLEO_F091RC-ARM | NUCLEO_F091RC | tests-mbed_hal-rtc_time       | OK     | 260.86             | default     |
| NUCLEO_F103RB-ARM | NUCLEO_F103RB | tests-mbed_drivers-rtc        | OK     | 212.89             | default     |
| NUCLEO_F103RB-ARM | NUCLEO_F103RB | tests-mbed_hal-lp_us_tickers  | OK     | 202.3              | default     |
| NUCLEO_F103RB-ARM | NUCLEO_F103RB | tests-mbed_hal-rtc_time       | OK     | 228.74             | default     |
| NUCLEO_F207ZG-ARM | NUCLEO_F207ZG | tests-mbed_drivers-rtc        | OK     | 211.66             | default     |
| NUCLEO_F207ZG-ARM | NUCLEO_F207ZG | tests-mbed_hal-lp_us_tickers  | OK     | 202.11             | default     |
| NUCLEO_F207ZG-ARM | NUCLEO_F207ZG | tests-mbed_hal-rtc_time       | OK     | 211.99             | default     |
| NUCLEO_F303ZE-ARM | NUCLEO_F303ZE | tests-mbed_drivers-lp_timeout | OK     | 211.46             | default     |
| NUCLEO_F303ZE-ARM | NUCLEO_F303ZE | tests-mbed_drivers-rtc        | OK     | 212.13             | default     |
| NUCLEO_F303ZE-ARM | NUCLEO_F303ZE | tests-mbed_hal-lp_ticker      | OK     | 211.54             | default     |
| NUCLEO_F303ZE-ARM | NUCLEO_F303ZE | tests-mbed_hal-lp_us_tickers  | OK     | 204.95             | default     |
| NUCLEO_F303ZE-ARM | NUCLEO_F303ZE | tests-mbed_hal-rtc_time       | OK     | 225.78             | default     |
| NUCLEO_F446RE-ARM | NUCLEO_F446RE | tests-mbed_drivers-lp_timeout | OK     | 211.41             | default     |
| NUCLEO_F446RE-ARM | NUCLEO_F446RE | tests-mbed_drivers-rtc        | OK     | 213.11             | default     |
| NUCLEO_F446RE-ARM | NUCLEO_F446RE | tests-mbed_hal-lp_ticker      | OK     | 208.04             | default     |
| NUCLEO_F446RE-ARM | NUCLEO_F446RE | tests-mbed_hal-lp_us_tickers  | OK     | 203.07             | default     |
| NUCLEO_F446RE-ARM | NUCLEO_F446RE | tests-mbed_hal-rtc_time       | OK     | 210.38             | default     |
| NUCLEO_F767ZI-ARM | NUCLEO_F767ZI | tests-mbed_drivers-lp_timeout | OK     | 207.25             | default     |
| NUCLEO_F767ZI-ARM | NUCLEO_F767ZI | tests-mbed_drivers-rtc        | OK     | 210.96             | default     |
| NUCLEO_F767ZI-ARM | NUCLEO_F767ZI | tests-mbed_hal-lp_ticker      | OK     | 209.13             | default     |
| NUCLEO_F767ZI-ARM | NUCLEO_F767ZI | tests-mbed_hal-lp_us_tickers  | OK     | 202.78             | default     |
| NUCLEO_F767ZI-ARM | NUCLEO_F767ZI | tests-mbed_hal-rtc_time       | OK     | 206.58             | default     |
| NUCLEO_L073RZ-ARM | NUCLEO_L073RZ | tests-mbed_drivers-lp_timeout | OK     | 216.19             | default     |
| NUCLEO_L073RZ-ARM | NUCLEO_L073RZ | tests-mbed_drivers-rtc        | OK     | 213.53             | default     |
| NUCLEO_L073RZ-ARM | NUCLEO_L073RZ | tests-mbed_hal-lp_ticker      | OK     | 211.46             | default     |
| NUCLEO_L073RZ-ARM | NUCLEO_L073RZ | tests-mbed_hal-lp_us_tickers  | OK     | 206.86             | default     |
| NUCLEO_L073RZ-ARM | NUCLEO_L073RZ | tests-mbed_hal-rtc_time       | OK     | 285.56             | default     |
| NUCLEO_L152RE-ARM | NUCLEO_L152RE | tests-mbed_drivers-lp_timeout | OK     | 211.89             | default     |
| NUCLEO_L152RE-ARM | NUCLEO_L152RE | tests-mbed_drivers-rtc        | OK     | 212.44             | default     |
| NUCLEO_L152RE-ARM | NUCLEO_L152RE | tests-mbed_hal-lp_ticker      | OK     | 212.19             | default     |
| NUCLEO_L152RE-ARM | NUCLEO_L152RE | tests-mbed_hal-lp_us_tickers  | OK     | 204.22             | default     |
| NUCLEO_L152RE-ARM | NUCLEO_L152RE | tests-mbed_hal-rtc_time       | OK     | 246.03             | default     |
| NUCLEO_L476RG-ARM | NUCLEO_L476RG | tests-mbed_drivers-lp_timeout | OK     | 211.57             | default     |
| NUCLEO_L476RG-ARM | NUCLEO_L476RG | tests-mbed_drivers-rtc        | OK     | 212.22             | default     |
| NUCLEO_L476RG-ARM | NUCLEO_L476RG | tests-mbed_hal-lp_ticker      | OK     | 213.02             | default     |
| NUCLEO_L476RG-ARM | NUCLEO_L476RG | tests-mbed_hal-lp_us_tickers  | OK     | 208.26             | default     |
| NUCLEO_L476RG-ARM | NUCLEO_L476RG | tests-mbed_hal-rtc_time       | OK     | 240.66             | default     |
+-------------------+---------------+-------------------------------+--------+--------------------+-------------+
mbedgt: test suite results: 41 OK
STM32: RTC: Call irq_handler whenever interrupt fires
lp_ticker driver is the known registered user of RTC handler API.

In case, a lp_ticker is set in the past, the lp_ticker_fire_interrupt
will be called which itself sets the RTC interrupt as pending by calling
NVIC_SetPendingIRQ(RTC_WKUP_IRQn). This all happens without actual
programing of the RTC wake-up.

As a result the RTC HW and corresponding HAL layer doesn't expect an
interrupt to happen and will not call HAL_RTCEx_WakeUpTimerEventCallback.

To sove this situation, we will not use HAL_RTCEx_WakeUpTimerEventCallback
weak definition but rather call handler whenever an RTC interrupt fires.
@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 11, 2017

Build : SUCCESS

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

Triggering tests

/test mbed-os

@0xc0170 0xc0170 added the needs: CI label Oct 11, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Oct 11, 2017

/morph test

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Oct 12, 2017

@theotherjimmy theotherjimmy merged commit 410ef0c into ARMmbed:master Oct 13, 2017

5 checks passed

Cam-CI uvisor Build & Test Success
Details
ci-morph-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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment