English
Language : 

AN970 Datasheet, PDF (4/10 Pages) STMicroelectronics – SPI COMMUNICATION BETWEEN ST7 AND EEPROM
SPI COMMUNICATION BETWEEN ST7 AND EEPROM
2.2.3 Baud rates
First the communication speed must be chosen. As the clock is given by the master, the user
has to configure the baud rate of the ST7 SPI (SPR[2-0] bits in the SPICR register).
For each CPU frequency, six Baud Rates are available. If fCPU = 8MHz, the baud rate range is
62.5kHz to 2MHz.
2.2.4 Clock phase and polarity
Then the clock polarity and the clock phase have to be chosen.
The clock polarity (CPOL bit of the SPCR register) controls the steady state value of the clock
when no data is being transferred.
The clock phase (CPHA bit of the SPCR register) selects on which clock transition the bit cap-
ture is made and consequently on which clock transition data is latched.
The user must be careful of the fact that some devices do not allow all timing relationships. For
instance, the ST95040 EEPROM device accepts only CPOL,CPHA = (0,0) or (1,1) configura-
tions.
4/10