![]() For clock characteristics, see the table below. For this, set i2c_config_t::clk_flags to 0. If no special capabilities are needed, such as APB, you can configure the clock allocator to select the source clock only according to the desired frequency. ![]() When i2c_config_t::clk_flags is 0, the clock allocator will select only according to the desired frequency. The clock allocator will choose one clock source that meets all the requirements of frequency and capability (as requested in i2c_config_t::clk_flags). Source Clock Configuration Ĭlock sources allocator is added for supporting different clock sources. For more details on the values and how to modify them, see Customized Configuration. Int i2c_slave_port = I2C_SLAVE_NUM i2c_config_t conf_slave = Īt this stage, i2c_param_config() also sets a few other I2C configuration parameters to default values that are defined by the I2C specification. Install Driver- activate the driver on one of the two I2C controllers as a master or slaveĭepending on whether you configure the driver for a master or slave, choose the appropriate item ![]() The following sections describe typical steps of configuring and operating the I2C driver:Ĭonfiguration - set the initialization parameters (master or slave mode, GPIO pins for SDA and SCL, clock speed, etc.) Reading and writing to registers which are in turn read/written by the master The driver supports the following features: ![]() I2C driver governs communications of devices over the I2C bus. A single I2C controller can operate as master or slave. With such advantages as simplicity and low manufacturing cost, I2C is mostly used for communication of low-speed peripheral devices over short distances (within one foot).ĮSP32 has 2 I2C controller (also referred to as port), responsible for handling communications on the I2C bus. The I2C bus consists of two lines: serial data line (SDA) and serial clock (SCL). I2C is a serial, synchronous, half-duplex communication protocol that allows co-existence of multiple masters and slaves on the same bus. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |