1
\$\begingroup\$

I could not find in the EFR32 I2C API the functions related to sending data to, or communicating with, a slave in general, as shown in the diagram below. Is there something like this?

enter image description here

\$\endgroup\$
9
  • \$\begingroup\$ What is the slave device you're transmitting to? You'll probably find the information you're looking for there. Otherwise general protocol information is in the I2C spec. \$\endgroup\$
    – mrbean
    Commented Sep 11, 2020 at 18:16
  • \$\begingroup\$ The link i brought is the I2C API spec. there is no transmit command. docs.silabs.com/mcu/5.4/efr32fg14/… \$\endgroup\$
    – rocko445
    Commented Sep 11, 2020 at 18:49
  • \$\begingroup\$ You're looking at the register bit-field definitions. Here is the API description. \$\endgroup\$
    – brhans
    Commented Sep 11, 2020 at 19:02
  • \$\begingroup\$ Hello, i have looked there the closesnt thing i saw is I2C_Transfer (I2C_TypeDef *i2c) which ontinue an initiated I2C transfer (single master mode only). But there is no function which resembles the I2C structure of send address of the slave then send the co mmand to the slave.Is there such function there? Thanks. \$\endgroup\$
    – rocko445
    Commented Sep 11, 2020 at 19:36
  • \$\begingroup\$ Looks like you linked version 5.4. The current version is 5.9, I would refer to that instead. \$\endgroup\$
    – mrbean
    Commented Sep 11, 2020 at 21:45

1 Answer 1

1
\$\begingroup\$

Silicon Labs provides a simplified driver to communicate with your specific humidity and temperature sensor (Si7021). The driver is in the board support package.

Here is the driver documentation:

https://siliconlabs.github.io/Gecko_SDK_Doc/efm32g/html/si7021_8c.html

https://siliconlabs.github.io/Gecko_SDK_Doc/efm32g/html/si7021_8h.html

Source Code:

https://siliconlabs.github.io/Gecko_SDK_Doc/efm32g/html/si7021_8c_source.html

https://siliconlabs.github.io/Gecko_SDK_Doc/efm32g/html/si7021_8h_source.html

The source code appears pretty straight forward.

\$\endgroup\$
3
  • \$\begingroup\$ Hello,How do i build a project from the web site you shown. I am new to this,i am femiliar with github example website where i can download a whole folder and import a whole project from the folder.How to assemble a project from the website page you shown? Thanks github.com/SiliconLabs/peripheral_examples/tree/master/series1/… \$\endgroup\$
    – rocko445
    Commented Sep 13, 2020 at 9:35
  • \$\begingroup\$ I've never actually used that MCU from Silicon Labs. I assume you have a development board from Silicon Labs did it come with any documentation or software examples? \$\endgroup\$
    – mrbean
    Commented Sep 17, 2020 at 4:53
  • \$\begingroup\$ No examples what so ever,abosutly NONE, I dont know how to assemble the commands in the API driver you showed.I dont know what to do,I just want a basic examples. Is there some thing i could use to build this example? \$\endgroup\$
    – rocko445
    Commented Sep 17, 2020 at 10:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.