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

Bug: The Watchdog example fails to compile on nRF52840 #51

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

Conversation

thinkier
Copy link

@thinkier thinkier commented Dec 9, 2024

  • Arduino board: Adafruit Feather nRF52840 Express
  • Arduino IDE version: 2.3.4

Repro

  1. Connect board to Arduino IDE and set it as the target
  2. Verify the sketch
  3. Error message appears
BasicUsage.ino:46:19: error: call to 'WatchdogNRF::disable' declared with attribute error: nRF's WDT cannot be disabled once enabled
   46 |   Watchdog.disable();
      |   ~~~~~~~~~~~~~~~~^~

exit status 1

Compilation error: call to 'WatchdogNRF::disable' declared with attribute error: nRF's WDT cannot be disabled once enabled

Proposed solution

Replace line 44 with #if !defined(NRF52_SERIES) && !defined(ARDUINO_ARCH_RP2040) - I think a DeMorgan's law accident occurred here.

I'm having other compilation issues but at least this one has a trivial fix.

- Arduino board:  **Adafruit Feather nRF52840 Express**
- Arduino IDE version:  **2.3.4**

# Repro
1. Connect board to Arduino IDE and set it as the target
2. Verify the sketch
3. Error message appears

```
BasicUsage.ino:46:19: error: call to 'WatchdogNRF::disable' declared with attribute error: nRF's WDT cannot be disabled once enabled
   46 |   Watchdog.disable();
      |   ~~~~~~~~~~~~~~~~^~

exit status 1

Compilation error: call to 'WatchdogNRF::disable' declared with attribute error: nRF's WDT cannot be disabled once enabled
```

# Suggested solution
Replace line 44 with `#if !defined(NRF52_SERIES) && !defined(ARDUINO_ARCH_RP2040)` - I think a DeMorgan's law accident occurred here.

I'm having other compilation issues but at least this one has an easy fix.
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.

1 participant