Commit 8dea7b4
erik.nyquist
Fix SPI clock divider calculation
If a clock value greater than the maximum supported
is passed (i.e. > 16MHz), the resulting value written
to the BAUDR register will be 0 which will disable
the serial output clock. Check for this and ensure
the value calculated for BAUDR register is never < 2.1 parent 331b2f0 commit 8dea7b4
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
| |||
0 commit comments