Skip to main content
tnn1985
Associate II
April 29, 2011
Question

SPI Slave Mode Clock Settings

  • April 29, 2011
  • 1 reply
  • 1708 views
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
This topic has been closed for replies.

1 reply

tnn1985
tnn1985Author
Associate II
May 2, 2011
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).''