| Electronic Components Datasheet Search |
|
PM0222 Datasheet(PDF) 27 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0222 Datasheet(HTML) 27 Page - STMicroelectronics |
|
27 / 33 page ![]() DocID025476 Rev 1 27/33 PM0222 I2C 33 This sequence will trigger a master write operation of one data present in the transmit FIFO to a slave I²C device addressed by 0x1D. The I2C_SR register contains information concerning the status of the transaction: Operation type (master-read, master-write, write-to-slave and read-from-slave). Status (successful, abort) Cause of the abort Length of the transaction This information will help to determine the next operation. For example, in case of an abort status, the program may retry starting the transaction. 10.3.2 I²C slave This section will show an example of configuring the I2C2 IP in slave mode with a 7-bit address 0x1E. // enable the peripheral; select the master mode, 7-bit addressing mode and the fast // mode for the baud rate generation I2C2->I2C_CR = 0x01 + (0x0<<1) + (0x0<<3) + (0x1<<4) I2C2->I2C_SCR = 0x1E; // define the slave address After this configuration the I2C2 is ready to work as a slave. Check the I2C_SR register to get the status of the transaction (see Section 10.3.1: I2C master). 10.4 I2C double bonding 10.4.1 I2C2 The first bit of the I2C_CONF register (see Brain reference manual, GPIO chapter) is used to reroute the I2C2 pins. After reset, this bit is configured as one, which means the I2C2 pins are rerouted through MCL and MDA, specific open-drain I/Os. If this bit is set to zero, the I2C2 pins are rerouted to digital standard push-pull I/Os. In both configurations, IO7 and IO8 have to be in serial mode 0 (see Section 5.1.1: I/O mode) to access the I2C2 pins, according to the configuration of the I2C_CONF register. |
|
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 |