Two slave address decoding for PSoC4100S I2C slave(Not EZI2C)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
YoIs_1298666
Level 5
Level 5
250 sign-ins 100 replies posted 100 sign-ins

Hello,

Can we have two slave address decoding for PSoC4100S I2C slave(not EZI2C)?

It doesn't seem to be possible in the component configuration.

pastedImage_0.png

But, can we add the secondary slave address with firmware?

Best regards,

Yocchi

0 Likes
1 Solution

Hi YoIs_1298666​ -san,

If you are talking about the received matched address (process based on received address) , you need to use the callback function  SetI2cAddressCustomInterruptHandler(). Refer section Multiple address support (Pg no 47) and Accept matching address RX FIFO section (Pg 48) from SCB component datasheet.

https://www.cypress.com/file/408071/download

SCBx_RX_MATCH should be considered as the primary slave address of the device. It is not the address of the matched received address. You need to enable Accept matching RX FIFO to move the received matched slave address to RX FIFO. The callback function can be used to read the received address from the RX FIFO and perform post data processing such as acknowledgment/ buffer settings based on the received address.

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
4 Replies
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi YoIs_1298666​,

You can use the Slave address Mask setting to accept a range of address.

Refer SCB Component datasheet and PSoC 4 Register TRM for implementation details.

https://www.cypress.com/file/408071/download

https://www.cypress.com/documentation/technical-reference-manuals/psoc-4100s-family-psoc-4-registers...

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes

Hello Bragadeesh-san,

Thank you very much for your reply.

I found a description of what you are saying.

pastedImage_0.png

Is there a register to know whether the slave address is 0x1B or 0x0B?

Is it "ADDR [7:0]"bits of "SCBx_RX_MATCH"register?

Best regards,

Yocchi

0 Likes

Hi YoIs_1298666​ -san,

If you are talking about the received matched address (process based on received address) , you need to use the callback function  SetI2cAddressCustomInterruptHandler(). Refer section Multiple address support (Pg no 47) and Accept matching address RX FIFO section (Pg 48) from SCB component datasheet.

https://www.cypress.com/file/408071/download

SCBx_RX_MATCH should be considered as the primary slave address of the device. It is not the address of the matched received address. You need to enable Accept matching RX FIFO to move the received matched slave address to RX FIFO. The callback function can be used to read the received address from the RX FIFO and perform post data processing such as acknowledgment/ buffer settings based on the received address.

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes

Hello Bragadeesh-san,

Thank you very much for your help.

I could find the sample code of "SetI2cAddressCustomInterruptHandler()" in "Accept matching address RX FIFO" of PSoC 4 Serial Communication Block (SCB) datasheet.

Best regards,

Yocchi

0 Likes