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

First pass at watchdog #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jacobrosenthal
Copy link

Doesn't have any new up config (as we dont need it, our bootloader set us up)

@jacobrosenthal
Copy link
Author

jacobrosenthal commented Feb 2, 2019

Some links

Looks like 2 different peripherals at least. Very similar, but maybe more in series 1, this implementation is series 0
https://www.silabs.com/documents/public/application-notes/an0015.0-efm32-ezr32-series-0-watchdog.pdf

EFM32 Series 0 consists of:
• EFM32 Gecko (EFM32G)
• EFM32 Giant Gecko (EFM32GG)
• EFM32 Wonder Gecko (EFM32WG)
• EFM32 Leopard Gecko (EFM32LG)
• EFM32 Tiny Gecko (EFM32TG)
• EFM32 Zero Gecko (EFM32ZG)
• EFM32 Happy Gecko (EFM32HG)
EZR32 Wireless MCU Series 0 consists of:
• EZR32 Wonder Gecko (EZR32WG)
• EZR32 Leopard Gecko (EZR32LG)
• EZR32 Happy Gecko (EZR32HG)

https://www.silabs.com/documents/public/application-notes/an0015.1-efr32-efm32-series-1-watchdog.pdf
MCU Series 1 consists of:
• EFM32 Jade Gecko (EFM32JG1/EFM32JG12/EFM32JG13)
• EFM32 Pearl Gecko (EFM32PG1/EFM32PG12/EFM32PG13)
• EFM32 Giant Gecko (EFM32GG11)
Wireless SoC Series 1 consists of:
• EFR32 Blue Gecko (EFR32BG1/EFR32BG12/EFR32BG13)
• EFR32 Flex Gecko (EFR32FG1/EFR32FG12/EFR32FG13)
• EFR32 Mighty Gecko (EFR32MG1/EFR32MG12/EFR32MG13)

Self { wdog }
}

fn free(self) -> registers::WDOG {
Copy link
Owner

Choose a reason for hiding this comment

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

Is there precedent in any other HAL for using free for the "undo the construction step" operation?

I'm using .destroy in thunderboard-sltb001a BSC, not sure I had a reference there.

Copy link
Author

Choose a reason for hiding this comment

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

#[cfg(feature = "unproven")]
#[allow(dead_code)]
impl Watchdog {
pub fn new(wdog: registers::WDOG) -> Self {
Copy link
Owner

Choose a reason for hiding this comment

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

To get a usable watchdog, some clock needs to be routed there, and should not be deconfigurable before freeing (destroying, see below) the watchdog first.

In the EFM32GG that clock is WDOGCLK configurable from ULRFCO, LFRCO or LFXO; I think this should be a with_clock (or any better unification of that name) a with other peripherals.

Copy link
Author

Choose a reason for hiding this comment

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

Then well have to not use the embedded_hal implementation. Not that I care

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.

2 participants