Commit 738a0e9
committed
Limit max SPI clock frequency to F_CPU/2
Fixes #576
From https://ww1.microchip.com/downloads/en/DeviceDoc/SAM_D21_DA1_Family_DataSheet_DS40001882F.pdf , Table 25-2
Syncronous mode (the one we are using) condition is fBAUD <= fref/2 .
Since fref can be as high as F_CPU (48MHz) let's limit the possible fBAUD to F_CPU/2 .1 parent d5d336c commit 738a0e9
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
| |||
0 commit comments