This post was last edited by bitter on 2023-4-13 08:55
[ Infineon PSOC 62S4 PIONEER KIT Review]——I2C
By looking through the data sheet, it is found that the PSOC 62S4 PIONEER KIT has six Serial Communication Blocks (SCBs), which can be configured in I2C mode and operate at a rate of up to 1Mbps. It also supports EZI2C, which creates a mailbox address range and effectively reduces I2C communication to reading and writing arrays in memory. SCB supports a 256-byte FIFO for receiving and transmitting. SCB is compatible with I2C standard mode, fast mode, and fast mode +. The I2C bus I/O is implemented using GPIOs in open-drain mode.
2. Introduction to main APIs
1. I2C initialization cyhal_i2c_init()
Note: By default it is configured as Master with bus frequency = CYHAL_I2C_MASTER_DEFAULT_FREQ. Use cyhal_i2c_configure() to change the default behavior.
- I2C configuration cyhal_i2c_configure()
Among them, the cyhal_i2c_cfg_t structure is
NOTE: Master/Slave specific functions are only available if the block is configured for that mode.
- I2C advanced configuration cyhal_i2c_configure_adv()
Among them, the cyhal_i2c_cfg_t structure is
- I2C event enable cyhal_i2c_enable_event()
Among them, the cyhal_i2c_event_t enumeration is
- I2C address event enable cyhal_i2c_enable_address_event()
Among them, the cyhal_i2c_addr_event_t enumeration is
PS:
- I don't know why the official I2C routine can be compiled successfully, but I2C does not send any data. Through debugging, I found that there was an error in calling cyhal_i2c_master_write() to send data. I don't know what the situation is.
- The KitProg3 in the PSOC 62S4 PIONEER KIT can act as a USB-I2C bridge and can communicate with the Bridge Control Panel (BCP) software which is an I2C MASYER. But I couldn't find the software after searching for a long time. The following figure shows the BCP interface and the connection between KitProg3 and PSoC 62S4.