Commit 2f7c23a
Add software reset in begin() for clean initialization
Write SW_RESET bit in CONTROL register (0xFA) during init to force a
full power-on reset. Clears any stale SMUX/measurement state from
previous runs. Polls I2C bus until chip responds after reset.
Fixes intermittent messed-up state on boot.
Co-authored-by: ladyada <limor@ladyada.net>1 parent 10fac2f commit 2f7c23a
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
75 | 90 | | |
76 | 91 | | |
77 | 92 | | |
| |||
0 commit comments