2011-04-29 05:46 AM
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 #clock2011-05-02 07:42 AM
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).''