-
Notifications
You must be signed in to change notification settings - Fork 3k
Merge feature-hal-spec-rtc to master #6996
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kjbracey
previously approved these changes
May 24, 2018
jeromecoutant
previously approved these changes
May 24, 2018
c1728p9
previously approved these changes
May 24, 2018
Marking as DNM since this will be coming in a larger PR. |
Keep the prototypes in rtc_api.h even when DEVICE_RTC is not defined. This allows devices that aren't fully compliant with the RTC API to still use the header and prototypes.
Keep the RTC code if either DEVICE_RTC or DEVICE_LOWPOWERTIMER is defined on the devices which use the RTC for both the rtc api and the low power timer api. This allows DEVICE_LOWPOWERTIMER to be enabled while DEVICE_RTC is turned off.
Add requirements, tests, an example implementation and additional function documentation to the HAL RTC API.
Turn off RTC for all devices. When support for a device is added this should be re-enabled.
Provide minor fixes for existing test cases. Add additional test cases.
…it is done. Since some platforms use RTC for low power timer RTC may be already enabled. Because of that we will only verify if rtc_isenabled() returns 1 in case when init is done and RTC time is set.
Verified that on some platforms 30s is not enough.
ARM_CM3DS_MPS2: `device_has` section is provided twice for this target with and without LOWPOWERTIMER support. Probably this is some rebasing issue which needs to be fixed. Enable LOWPOWERTIMER support for this board. MIMXRT1050_EVK: LOWPOWERTIMER is created based on RTC on this board. Since RTC is disabled LOWPOWERTIMER support also needs to be disabled.
…is executed RTC reset test was failing when board has been just powered and RTC reset test was executed for the first time (issue has been detected on CI). In such case RTC initialization takes more time than in futher rtc_init calls. This has impact on green-tea communication. Commands send by host immediately after init command (write, read) were not handled on the device side and no response to the host was provided. To fix this problem test communication flow has been modified. Device sends ack to the host after RTC init is done. Host sends further RTC commands when ack from the device has been received. Edit: There are still some communication issues on the CI. Add ack from the device after each executed command. Increase test timeout and wait after reset.
This board inherits from STM_FAMILY, but drivers for this board are not consistent with the new standards. This board needs to be disabled for now.
rtc_free() does not stop the RTC from counting. Only disables clock gate since processor no longer needs to read RTC registers.
Make rtc_isenabled() to return 1 if the RTC is initialized and the time has been set; 0 otherwise. Disable clock gate on exit from this function if RTC was initialized.
I implemented the RTC feature. The mainly changing is here. - rtc_init() Previously, I have initialized the time information register in the function, so the time count was cleaned by every calling rtc_init(). Currently, rtc_init() doesn't stop RTC from counting, and rtc_init() is safe to call repeatedly. Therefore in order to satisfy specifications,I removed the initialization process of the time information register in the function. - rtc_free() Previously, I have initialized the RTC related register same as rtc_init(), so the time count was cleaned by calling rtc_free(). Currently, rtc_free() doesn't stop RTC from counting. Therefore in order to satisfy specifications,I removed the process and decided not to do anything in the function. If powerdown the RTC, Supply of the clock to the RTC is stopped, cannot keeping the count.
mbed RTC specifications now dictate that the RTC needs to retain and keep on counting through reset. On Silicon Labs parts, this means the RTC API can not be backed by the Silicon Labs RTC peripheral, since that doesn't provide retention functionality. Therefore: * On EFM32GG, EFM32WG, EFM32LG: mbed RTC API is now backed by BURTC. * On EFM32PG, EFR32MG, EFM32PG12, EFR32MG12: mbed RTC API is now backed by RTCC. * On EFM32ZG, EFM32HG: mbed RTC API is sadly no longer supported, since these chips don't have retained memory.
Tests still passing
Same MCUXpresso SDK driver used for Kinetis devices Signed-off-by: Mahesh Mahadevan <[email protected]>
Signed-off-by: Mahesh Mahadevan <[email protected]>
bd3f99f
76946da
to
bd3f99f
Compare
Removed labeling to make 5.9 tags easier to sort through. Will be brought in with #7009. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Bring new RTC HAL API to master.
Pull request type
@cmonr last one here.