Closed samc1213 closed 2 years ago
You can't have a 10MHz SPI clock on ATMega328P running at 16MHz... max is 8MHz.
@TzOk83 thanks - so do you think the default 10MHz is too high? In my pull request I've kept the default at 10MHz but allow users to change it.
According to the ATMega328P documentation, max SCK is fosc/2, so for Arduino Uno/Pro-Mini/Nano it is 8MHz max, as they run at 16MHz.
I am having trouble at 10MHz with some SPI data corruption. However, at 1MHz SPI clock speed, I am able to read the correct data consistently. The library should allow a customizable SPI clock speed.