2628 views|3 replies

82

Posts

0

Resources
The OP
 

[Infineon PSOC 62S4 PIONEER KIT Review]——I2C [Copy link]

This post was last edited by bitter on 2023-4-13 08:55

[ Infineon PSOC 62S4 PIONEER KIT Review]——I2C

  • Basic Introduction

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.

  1. 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.

  1. I2C advanced configuration cyhal_i2c_configure_adv()

Among them, the cyhal_i2c_cfg_t structure is

  1. I2C event enable cyhal_i2c_enable_event()

Among them, the cyhal_i2c_event_t enumeration is

  1. I2C address event enable cyhal_i2c_enable_address_event()

Among them, the cyhal_i2c_addr_event_t enumeration is

PS:

  1. 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.
  2. 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.

mtb-example-hal-i2c-master-master.zip

42.33 KB, downloads: 0

官方例程

This post is from RF/Wirelessly

Latest reply

The master/slave specific functions are only available if the block is configured for that mode.   Details Published on 2023-4-12 19:18
 

6822

Posts

11

Resources
2
 
Your post is excellent, with both text and pictures. It would be perfect if there was a video explanation.
This post is from RF/Wirelessly
 
 

6570

Posts

0

Resources
3
 

The master/slave specific functions are only available if the block is configured for that mode.

This post is from RF/Wirelessly

Comments

The functions specific to the master must be configured as master before they can be used. The same is true for slaves. The HAL library should have made restrictions to prevent errors.  Details Published on 2023-4-13 08:47
 
 
 

82

Posts

0

Resources
4
 
This post was last edited by bitter on 2023-4-13 08:54
Jacktang posted on 2023-4-12 19:18 The master/slave specific functions are only valid when the block is configured in this mode.

MASTER-specific functions must be configured as I2C MASTER to be used, and the same applies to SLAVE

It should be that the HAL library has restrictions to prevent errors

This post is from RF/Wirelessly
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

快速回复 返回顶部 Return list