Electronic Components Datasheet Search
  British  ▼
ALLDATASHEET.CO.UK

X  

STM8S Datasheet(PDF) 278 Page - STMicroelectronics

Part # STM8S
Description  STM8S Series and STM8AF Series 8-bit microcontrollers
PDF  467 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

STM8S Datasheet(HTML) 278 Page - STMicroelectronics

Back Button STM8S Datasheet HTML 274Page - STMicroelectronics STM8S Datasheet HTML 275Page - STMicroelectronics STM8S Datasheet HTML 276Page - STMicroelectronics STM8S Datasheet HTML 277Page - STMicroelectronics STM8S Datasheet HTML 278Page - STMicroelectronics STM8S Datasheet HTML 279Page - STMicroelectronics STM8S Datasheet HTML 280Page - STMicroelectronics STM8S Datasheet HTML 281Page - STMicroelectronics STM8S Datasheet HTML 282Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 278 / 467 page
background image
Serial peripheral interface (SPI)
RM0016
278/467
DocID14587 Rev 14
To avoid any of these effects, it is recommended to respect the following procedure when
disabling the SPI:
In master or slave full duplex mode (BDM = 0, RXONLY = 0):
1.
Wait until RXNE = 1 to receive the last data
2.
Wait until TXE = 1
3.
Then wait until BSY = 0
4.
Disable the SPI (SPE = 0) and eventually enter Halt mode (or disable the peripheral
clock).
In master or slave unidirectional transmit-only mode (BDM = 0, RXONLY = 0)
or bidirectional transmit mode (BDM = 1, BDOE = 1):
After the last data is written in the SPI_DR register:
1.
Wait until TXE = 1
2.
Then wait until BSY = 0
3.
Disable the SPI (SPE = 0) and, if desired, enter Halt mode (or disable the peripheral
clock).
In master unidirectional receive-only mode (MSTR = 1, BDM = 0, RXONLY = 1)
or bidirectional receive mode (MSTR = 1, BDM = 1, BDOE = 0):
This case must be managed in a particular way to ensure that the SPI does not initiate a
new transfer:
1.
Wait for the second to last occurrence of RXNE = 1 (n-1)
2.
Then wait for one SPI clock cycle (using a software loop) before disabling the SPI
(SPE = 0)
3.
Then wait for the last RXNE=1 before entering Halt mode (or disabling the peripheral
clock).
Note:
In master bidirectional receive mode (MSTR=1 and BDM=1 and BDOE=0), the BSY flag is
kept low during a transfer.
In slave receive-only mode (MSTR = 0, BDM = 0, RXONLY = 1) or bidirectional
receive mode (MSTR = 0, BDM = 1, BDOE = 0):
1.
You can disable the SPI (write SPE = 1) whenever you want: the current transfer will
complete before being effectively disabled.
2.
Then, if you want to enter Halt mode, you must first wait until BSY = 0 before entering
Halt mode (or disabling the peripheral clock).



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com