EasyManua.ls Logo

Silicon Laboratories EFM8 - Page 20

Silicon Laboratories EFM8
35 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Figure 4.4. Read Response From Radio
If CTS is polled over the SPI bus, first the host MCU should pull the NSEL pin low. This action should be followed by sending out the
0x44 Read command ID and providing an additional eight clock pulses on the SCLK pin. The radio will provide the CTS byte on its SDO
pin during the additional clock pulses. If the CTS byte is 0x00, then the response is not yet ready and the host MCU should pull up the
NSEL pin and repeat the procedure from the beginning until CTS becomes 0xFF. If CTS is 0xFF, then the host MCU should keep the
NSEL pin low and provide clock cycles on the SCLK pin, as many as the data to be read out requires. The radio will clock out the
requested data on its SDO pin during the additional clock pulses.
Figure 4.5. Monitor CTS and Read the Response
Reading the response from the radio can be interrupted earlier. For example, if the host MCU asked for five bytes of response, it may
read fewer bytes in one SPI transaction. As long as a new command is sent, the radio keeps the response for the last request in the
command buffer. The host MCU can read the response several times in a new SPI transaction. In such a case, the response is always
provided from the first byte.
Notes:
Up to 16 bytes of response can be read from the radio in one SPI transaction. If more bytes are read, the radio will provide the same
16 bytes of response in a circular manner.
If the command says that the host MCU expects N bytes of response, but during the read sequence, the host MCU provides less
than N bytes of clock pulses, it causes no issue for the radio. The response buffer is reset if a new command is issued.
If the command says that the host MCU expects N bytes of response, but during the read sequence, the host MCU provides more
than N bytes of clock pulses, the radio will provide unpredictable bytes after the first N bytes. The host MCU does not need to reset
the SPI interface; it happens automatically if NSEL is pulled low before the next command is sent.
AN954: Programming Guide for EFM8 and EZRadio ®
Application Programming Interface
silabs.com | Smart. Connected. Energy-friendly. Rev. 0.1 | 19

Related product manuals