cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Slave Mode Clock Settings

tnn1985
Associate II
Posted on April 29, 2011 at 14:46

Hi,

is it required to setup the prescaler in SPI slave mode? And why can i scope a clock of 1Mhz, if i set a prescaler of 2 (f_Master/2) in master mode whereas i have an oscillator of 16Mhz. (standard STM8S-Discovery Board)?

Thx in advance

#spi-slave-mode #clock
1 REPLY 1
tnn1985
Associate II
Posted on May 02, 2011 at 16:42

Ok, my bad. I might have skipped this line in Chapter 20.3.2 ''Configuring the SPI in slave mode'' :

''The value set in the BR[2:0] bits in the SPI_CR1 register, does not affect the data transfer rate.''

So it doesnt matter if you set the Prescaler or not. The Clock is given by the master.

And i also skipped in Chapter 8.1.2 ''HSI''

''Note: At startup the master clock source is automatically selected as HSI RC clock output divided by 8 (fHSI/8).''