| Electronic Components Datasheet Search |
|
UM1865 Datasheet(PDF) 128 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM1865 Datasheet(HTML) 128 Page - STMicroelectronics |
|
128 / 132 page ![]() SPI interface UM1865 128/132 DocID027514 Rev 1 5.2 SPI communication protocol To communicate with the BlueNRG-MS, the data on the SPI bus must be formatted as described in this section. An SPI transaction is defined from the time instant when the master puts the nCS line to low, until the time instant when the nCS line is back to high. Each SPI transaction should contain 1 data frame. Each data frame should contain at least 5 bytes of header, and may have 0-N bytes of data. 5.2.1 Header Figure 10. SPI header format Figure 10 above shows an SPI frame, with minimum 5 bytes SPI header, and 0 byte SPI data. The header of the master is on the MOSI line, which is 1 control byte and 4 bytes 0x00. The control byte can have only the value of 0x0A (SPI write) or 0x0B (SPI read). The BlueNRG-MS returns the slave header on the MISO line at the same time. The 1st byte is the SPI READY indication. It must be 0x02 to indicate the slave SPI interface is ready. If it is any value other than 0x02, the master must ignore the following 4 bytes and abort the SPI transaction. If the BlueNRG-MS SPI is ready (Ready byte = 0x02), the following 4 bytes give 2 buffer sizes for write and read, 2 bytes for each buffer. Of the 2-byte buffer size, the lower byte comes first, then the higher byte. The write buffer size means how many bytes the master can write to the BlueNRG-MS. The read buffer size means how many bytes in the BlueNRG-MS are waiting for the master to read. For example, if the slave header is 0x0200010500, the write buffer size is 0x0100 and the read buffer size is 0x0005. So the master cannot write more than 256 bytes to the BlueNRG-MS, and it should read back 5 bytes from the BlueNRG-MS as soon as possible. The SPI master may poll the BlueNRG-MS by sending dummy SPI headers, just to check what value is in the BlueNRG-MS SPI header. For example, the SPI master can send an SPI frame with only 5 bytes header: the CTRL byte can be either write or read, then following 4 bytes 0x00 dummy bytes. After the header, the SPI master stops the frame, without sending any real data. So the write/read action will not happen in practice. |
|
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 |
| 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 |