{"action":"created","issue":{"url":"https://api.github.com/repos/mbedmicro/mbed/issues/1523","repository_url":"https://api.github.com/repos/mbedmicro/mbed","labels_url":"https://api.github.com/repos/mbedmicro/mbed/issues/1523/labels{/name}","comments_url":"https://api.github.com/repos/mbedmicro/mbed/issues/1523/comments","events_url":"https://api.github.com/repos/mbedmicro/mbed/issues/1523/events","html_url":"https://github.com/mbedmicro/mbed/pull/1523","id":130849898,"number":1523,"title":"STM32L476 Update rtc_api.c","user":{"login":"star297","id":6283197,"avatar_url":"https://avatars.githubusercontent.com/u/6283197?v=3","gravatar_id":"","url":"https://api.github.com/users/star297","html_url":"https://github.com/star297","followers_url":"https://api.github.com/users/star297/followers","following_url":"https://api.github.com/users/star297/following{/other_user}","gists_url":"https://api.github.com/users/star297/gists{/gist_id}","starred_url":"https://api.github.com/users/star297/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/star297/subscriptions","organizations_url":"https://api.github.com/users/star297/orgs","repos_url":"https://api.github.com/users/star297/repos","events_url":"https://api.github.com/users/star297/events{/privacy}","received_events_url":"https://api.github.com/users/star297/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-02T23:14:59Z","updated_at":"2016-02-09T15:50:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mbedmicro/mbed/pulls/1523","html_url":"https://github.com/mbedmicro/mbed/pull/1523","diff_url":"https://github.com/mbedmicro/mbed/pull/1523.diff","patch_url":"https://github.com/mbedmicro/mbed/pull/1523.patch"},"body":"Added RTC ISR check code for Mbed rtc_isenabled function.\r\nRemoved  rtc_inited parts.\r\n\r\nTested on Nucleo-L476 and Disco-L476 boards with and without vBat pin powered.\r\nAlso fully tested on prototype hardware.\r\nTargets no longer resets RTC time registers on POR or nRST including sleep modes.\r\n"},"comment":{"url":"https://api.github.com/repos/mbedmicro/mbed/issues/comments/181922800","html_url":"https://github.com/mbedmicro/mbed/pull/1523#issuecomment-181922800","issue_url":"https://api.github.com/repos/mbedmicro/mbed/issues/1523","id":181922800,"user":{"login":"dbestm","id":7252526,"avatar_url":"https://avatars.githubusercontent.com/u/7252526?v=3","gravatar_id":"","url":"https://api.github.com/users/dbestm","html_url":"https://github.com/dbestm","followers_url":"https://api.github.com/users/dbestm/followers","following_url":"https://api.github.com/users/dbestm/following{/other_user}","gists_url":"https://api.github.com/users/dbestm/gists{/gist_id}","starred_url":"https://api.github.com/users/dbestm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbestm/subscriptions","organizations_url":"https://api.github.com/users/dbestm/orgs","repos_url":"https://api.github.com/users/dbestm/repos","events_url":"https://api.github.com/users/dbestm/events{/privacy}","received_events_url":"https://api.github.com/users/dbestm/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T15:50:56Z","updated_at":"2016-02-09T15:50:56Z","body":"The RTC init flag is used in the rtc_init() function before the init of the RTC but after the init of the clock which is needed to read the time and the date. So the RTC is not reset after a nRST.\r\nIf you want to remove the rtc_inited parts, you have to move the setting of the clock inside the rtc_isenabled() function.\r\nLet us know what you prefer?\r\neither use rtc_inited as it is done\r\nor set the clock + use RTC init flag in rtc_enabled()\r\nI remind you if the clocks are not set, the RTC can run but the time and date registers will not be updated."}}