Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

WDHold and Sw_Bus_Prime both assigned pin 23 — ResetWD() glitches primary power bus

Đang mở
#4 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
arduino, cpp
Lĩnh vực
embedded-iot

Hướng nghiên cứu

Start by reading the pin assignments in src/Okapi.h, then trace begin() and ResetWD() and the four active Run() call sites named in the issue. Confirm the board's pin constraints and whether the signals are intended to share a pin before choosing a fix; done means watchdog resets no longer glitch the primary power bus, with the shared-pin behavior documented if intentional.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Bug

In src/Okapi.h, two member variables are both assigned Arduino pin 23:

uint8_t WDHold = 23;
uint8_t Sw_Bus_Prime = 23;

ResetWD() pulses WDHold HIGH then LOW (5 µs LOW pulse) to feed the external watchdog. Because Sw_Bus_Prime is the same physical pin — held HIGH in begin() to enable the primary power rail — every ResetWD() call briefly pulls the power bus LOW.

ResetWD() was previously commented out everywhere in Run(); commit 7c04bf1 enabled it in four active call sites (NewLog path, LogEvent/alarm-reset path, ManualLog path, ExtIntTripped path), so this glitch now fires multiple times per duty cycle.

Failure scenario

Any I2C or SPI transaction in progress when ResetWD() fires sees a momentary power rail droop. On a battery/solar system with marginal capacitance this causes I2C NACKs, SD write corruption, or sensor read failures every duty cycle.

Possible causes

Either WDHold should be a different pin, or Sw_Bus_Prime should be a different pin, or both signals intentionally share a pin (in which case ResetWD() needs a null-pin guard and the shared assignment should be documented).

Severity

High — active in every duty cycle once ResetWD() is enabled.

🤖 Generated with Claude Code

Ngôn ngữ chính
C++
Star
1
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NorthernWidget/Okapi_Library

Tất cả issue của NorthernWidget/Okapi_Library

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.