Commit 13719c5
Fix PWM slice calculation for RP2350 in RP.PWM.To_PWM
The function performed Shift_Right (Pin, 1) but then ignored the shifted
value and overwrote Slice with "Pin and 2#111#". The fix now correctly
uses the already shifted value for the mask operation (Slice and
2#111#). This matches the RP2350 datasheet and resolves incorrect slice
assignments (e.g. GPIO14 was mapped to slice 6 instead of 7), which
caused missing or flickering PWM outputs when pins shared a slice on the
Pico 2.1 parent a87af34 commit 13719c5
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
0 commit comments