Go Down

Topic: SPI speed with MFRC522 does not change (Read 192 times) previous topic - next topic


I'm using the MFRC522 RFID module with this library and example DumpInfo sketch. In the MFRC522.h file the MFRC522_SPICLOCK is set to SPI_CLOCK_DIV4 (which should correspond to 4MHz on Arduino Uno) but if I look at the SPI SCK line using oscilloscope, it reads frequency of 125kHz which should correspond to divider of 128. See picture 1.

And what is even weirder is that if I change the divider in the library to 64 nothing changes. See picture 2 (green is default DIV4/DIV128 overlaid with purple DIV64).

Any ideas why the speed does not change? Thanks!


Please post your code (using code tags) showing how you change the clock rate or at least explain what you're changing to implement the 4 MHz rate.

Did you also note there was a change in the library just a few days ago that fixed something with the SPI clock rate? Change was ref #545 in the Git. How old is your copy of the library?
Vacuum tube guy in a solid state world

Go Up