background image

Run and Test

First data section

: First attempt to establish communication with the 

device by transmitting the device address (0x57).

Second data section

: After the external device has successfully 

acknowledged the transmission, the write process of the register location 
(0xF2) is started (transmitting the device address (0x57) with the 
Read/Write bit set to „write“ and transmitting 0xF2 afterwards).

Third data section

: Reading process is started by transmitting the device 

address (0x57) and setting Read/Write bit to „read“: six bytes from the 
RTCC device, containing the MAC address, are then received.

12

2019-10-17

Copyright © Infineon Technologies AG 2019. All rights reserved.

Содержание I2C Read Ext Device 1

Страница 1: ...AURIX TC2xx Microcontroller Training V1 0 0 I2C_Read_Ext_Device_1 Read external device MAC address via I2C Please read the Important Notice and Warnings at the end of this document...

Страница 2: ...figured as I2C master is used to read the MAC address stored in MCP79411 a Real Time Clock device mounted on the board KIT_AURIX_TC297_TFT_BC Step The AURIX device reads the MAC address through the I2...

Страница 3: ...to a positive supply voltage via pull up resistors An I2C device can work as a master or as a slave The master which is normally a microcontroller initiates and terminates the transfer and generates...

Страница 4: ...oard and connected via the I2C bus to the microcontroller The used data lines are connected to the positive power supply via two pull up resistors The MCP79411 is a battery backed I2C Real Time Clock...

Страница 5: ...itialization of the I2C module by initializing an instance of the IfxI2c_I2c_Config structure The initialization of every device that is connected to the I2C module in this case the MCP79411 chip by i...

Страница 6: ...tandard mode 400 kbit s in fast mode and 3 4 Mbit s in high speed mode pins a structure to set the port pins used for the communication A serial data line SDA and a serial clock line SCL carry the inf...

Страница 7: ...alues Afterwards the 7 bit slave address can be set through the parameter deviceAddress The function IfxI2c_I2c_initDevice finalizes the I2C initialization by connecting the device configuration with...

Страница 8: ...er in which the requested data is stored on the external device the register containing the MAC address of MCP79411 is 0xF2 This is done using the IfxI2c_I2c_write function Then the reading of the MAC...

Страница 9: ...flashing the device perform the following steps Use the debugger to watch the hexadecimal value of the global array g_macAddr The MAC address is unique for each board 9 2019 10 17 Copyright Infineon T...

Страница 10: ...est can be performed with an oscilloscope Two oscilloscope probes can be connected to SDA and SCL pins to observe the generated and received signals 10 2019 10 17 Copyright Infineon Technologies AG 20...

Страница 11: ...on device address byte Second data section device address byte and register address Third data section device address byte and six bytes of data Please refer to the next slide for more details about t...

Страница 12: ...te process of the register location 0xF2 is started transmitting the device address 0x57 with the Read Write bit set to write and transmitting 0xF2 afterwards Third data section Reading process is sta...

Страница 13: ...www infineon com aurix expert training AURIX Development Studio is available online https www infineon com aurixdevelopmentstudio Use the Import function to get access to more code examples For questi...

Страница 14: ...the product for the intended application and the completeness of the product information given in this document with respect to such application For further information on the product technology deliv...

Отзывы: