Skip to content

v2.x WDT & RTC libraries #363

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

Merged
merged 6 commits into from
Apr 6, 2021
Merged

v2.x WDT & RTC libraries #363

merged 6 commits into from
Apr 6, 2021

Conversation

adamgarbo
Copy link
Contributor

Hi @Wenn0101 ,

Here is the rewritten WDT library for v2.x of the Apollo3 Core. I based it on the format of the RTC library that @oclyke rewrote for v2.x

I've standardized the RTC and WDT intra-library instantiations, so the objects are now wdt and rtc (lowercase). This is handy, though I suspect some users may like to have more control over how they create their objects.

I also fixed the low-power examples with some assistance from @paulvha. As UART is handled differently now with Mbed OS, I simply modified the low power code so that it manually disables/reenables the UART0 TX/RX pins. It was also necessary to enable the lower 512K of memory since v2.x code is 10x the size of v1.x (Mbed is a hog).

All examples compile using a SparkFun Redboard Artemis.

Happy to assist further or make any necessary changes.

Cheers,
Adam

@jerabaul29
Copy link

Any plans to merge this into main?

@adamgarbo
Copy link
Contributor Author

adamgarbo commented Mar 26, 2021

Hi @jerabaul29,

I suspect this will likely be included with v2.1. However, I believe more testing is required. I recently tested the libraries in a larger project and have been observing some strange behaviour with alarm interrupts failing to trigger, or triggering prematurely, which is perhaps due to the RTC/WSR ISRs.

I'm actively looking into this.

Cheers,
Adam

@Wenn0101
Copy link
Contributor

^ Yep. Hoping to include this functionality in v2.1.0.

I will be doing more testing in the coming week.

@adamgarbo
Copy link
Contributor Author

@Wenn0101, after some good discussions on the forums, I've updated the low power code to the correct way of powering down the memory. Up until now, all previous examples have been doing so incorrectly. It is 100% confirmed not to brick your board!

@Wenn0101 Wenn0101 merged commit 4e21987 into sparkfun:dev Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants