EFM8LB1 I2C Slave High speed mode Introduce

by <a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero Employee</font></font> </a> yucheng on ‎05-05-2017 04:40 AM

 

The I2C Slave interface of EFM8LB1 is a 2-wire, bidirectional serial bus that is compatible with the I2C Bus Specification 3.0. It is capable of transferring in high-speed mode (HS-mode) at speeds of up to 3.4 Mbps, and fully downward compatible with slower speed devices.

It also supports clock stretching for cases where the core may be temporarily prohibited from transmitting a byte or processing a received byte during an I2C transaction.

 

By default, the I2C bus operates at speeds of up to Fast-mode (F/S mode) only, where the maximum transfer rate is 400 kbps. And it will switch from F/S mode to HS-mode only with the following sequence:

  1. START bit (S)
  2. 8-bit master code (0000 1XXX)
  3. NACK bit (N)

The HS-mode master codes (0x08 – 0x0F) are reserved 8-bit codes which are not used for slave addressing or other purposes.

The HS-mode compatible I2C master will switch the I2C bus to HS-mode by transmitting the above sequence at a transfer rate of not more than 400 kbps. After that, it will transfer data at a rate of up to 3.4 Mbps. And the I2C bus will switch back to F/S mode when the I2C master transmits a STOP bit.

10.png

 

As below is the High Speed (HS) exercise of EFM8LB1 with the I2C master JI-300. The I2C slave example code can be get after installing the Simplicity Studio.

C:\SiliconLabs\SimplicityStudio\v4\developer\sdks\8051\v4.0.3\examples\EFM8LB1_SLSTK2030A\I2C_Slave

 

After setting up the basic environment, a set of messages and instruction should be added to the Message List of master JI-300 to exercise the EFM8LB1 in HS-Mode.

Four types will be added: two I2C messages – Read and Write, and two instructions – HS-Mode Set and Comment. Please refer to the JI-300 user manual for the detailed steps for how to add the messages.

http://www.jupiteri.com/JI-300_Files/JI_JI-300.html

 

To expedite data entry, please just use the attached setup file “JI300_efm8lb1.ser” to load the message list. The figure as below illustrated the meaning of each message and instruction.

11.png

 

In the exercise, the default setting of master code is “0x08”. As below is the captured signal, which show that the transfer rate for the sequence is 400 kbps.

 

12.png

 

After transmitting the above sequence, master will switch to HS-mode to transfer data at a rate of up to 3.4 Mbps. For example, set the Frequency of master JI-300 to 2.0M, the transfer rate will switch from 400 kbps to 2.0 Mbps.

 

13.png

 

14.png

 

Since the I2C bus will switch back to F/S mode when the I2C master transmits a STOP bit, so please just remove the STOP bit for all messages following the HS-mode Set instruction to support continue data transfers.