SPI 3 SCK rates with 84MHz Nucleo F401RE
The actual SCK frequency for the SPI 3 module in an 84 MHz Nucleo-F401RE has been measured. A test program was written so that various values could be sent to the spi.frequency() parameter, and the resultant SCK signal then observed with an oscilloscope.
The F401RE CPU only supports 8 SCK frequencies; this limitation is due to the fact that only a 3-bit divider is provided in the rate generator.
According to the documentation, SPI 1 should run at twice the rate that SPI 2 and SPI 3 operate. This may account for the fact that the SPI 3 SCK frequency is about half of what would be expected, as shown in the table below.
The eight observed rates agree with theory, assuming that SPI 3 is fed from PCLK1 (which is running at 42MHz). However, the measured rates for SPI 3 SCK are not in good agreement with the requested frequencies, probably for the reason noted above. The frequency arguments listed are the empirically-determined points at which SCK switches from one value to the next.
"frequency" argument: | < 600K | 600K | 1MHz | 2MHz | 5MHz | 10MHz | 21MHz | 42MHz |
---|---|---|---|---|---|---|---|---|
SPI3 SCK Measured frequency: | 164KHz | 328KHz | 656KHz | 1.31MHz | 2.62MHz | 5.25MHz | 10.5 MHz | 21.0 MHz |
Please log in to post comments.