PSoC6 EZI2C Problem when setting two slave addresses

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

cross mob
Tom2021
Level 1
Level 1
First like received 5 replies posted 10 sign-ins

Hello. I am looking for advice on the following Problem.

Problem:.
When two slave addresses are set, it sometimes does not return NAK or freezes for accesses to addresses other than its own.
Specifically, in the following example, ACK is returned for addresses 0x10 and 0x24, and the device operates normally.
NAK is returned for addresses 0x11,12,13, which is also normal. However, at 0x14 and 0x20 (and others), the SCL line seems to have frozen with the SCL line dropping to LOW at the timing of returning NAK.
Any advice would be appreciated.

Environment in which the problem was observed:.
HW: CY8CKIT-062S4
Template Application(s): I2C Master EzI2C Slave

I have added or changed the following (>>) in main.c

> /* I2C slave address to communicate with */
> #define EzI2C_SLAVE_ADDR (0x24UL)
>> #define EzI2C_SLAVE2_ADDR (0x10UL)

>> cyhal_ezi2c_slave_cfg_t sEzI2C_sub_cfg, sEzI2C_sub2_cfg;

>> sEzI2C_sub2_cfg.buf = ezi2c_buffer;
>> sEzI2C_sub2_cfg.buf_rw_boundary = EZI2C_BUFFER_SIZE;
>> sEzI2C_sub2_cfg.buf_size = EZI2C_BUFFER_SIZE;
>> sEzI2C_sub2_cfg.slave_address = EzI2C_SLAVE2_ADDR;
>
> sEzI2C_cfg.data_rate = CYHAL_EZI2C_DATA_RATE_400KHZ;
> sEzI2C_cfg.enable_wake_from_sleep = false;
> sEzI2C_cfg.slave1_cfg = sEzI2C_sub_cfg;
>> sEzI2C_cfg.slave2_cfg = sEzI2C_sub2_cfg;
> sEzI2C_cfg.sub_address_size = CYHAL_EZI2C_SUB_ADDR8_BITS;
>> sEzI2C_cfg.two_addresses = true;

0 Likes
8 Replies
MuhammadNanda_K
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 50 likes received

Hello @Tom2021 ,

Thank you for coming back to our community. 🙂
For your issue, can you inform your pin connections / hardware setup for 2 slave addresses ?
Also if you want, you can also share your project folder.

Thank you and regards,
Muhammad Nanda

0 Likes
lock attach
Attachments are accessible only for community members.
Tom2021
Level 1
Level 1
First like received 5 replies posted 10 sign-ins

Hello. Thank you for your reply.

The I2C pin designation is P6[4],P6[5] according to the template resource_map.h.
Please check the project folder as I will share it with you.

I communicated with the Bridge Control Panel 1.23.0 from the PC via the KitProg3 I2C bridge.
The commands used for this are minimal: "r 24 x p", "r 10 x p".

Thanks a lot.

MuhammadNanda_K
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 50 likes received

Hello @Tom2021 ,

My apologize that I cannot reproduce your issue using CY8CPROTO-063-BLE, CY8CKIT-062-BLE and CY8CKIT-062S2-43012. I do not hold CY8CKIT-062S4 currently. The results are similar like this:

nandax_0-1688660190336.png

In that experiment (in the screen shot), I set:
#define EzI2C_SLAVE_ADDR        (0x14) 
#define EzI2C_SLAVE2_ADDR       (0x20)

I am sorry, to make further analysis, may you share your error screen shot ? 

Thank you and regards,
Muhammad Nanda

0 Likes
Tom2021
Level 1
Level 1
First like received 5 replies posted 10 sign-ins

Hello.
Thank you very much for your experiment and your reply.

I also have a CY8CPROTO-063-BLE, so I checked it and the symptoms are the same as CY8CKIT-062S4.
Normal ACK return: 0x10,0x24
NAK returned normally: 0x08-0x0F,0x11-0x13,0x15-0x1F,0x21-0x23,0x25-0x2F,0x31-0x33,0x35-0x77
Freezes at the timing of NAK: 0x14,0x20,0x30,0x34
The slave address where the abnormality occurs seems to be related to (0x10 | 0x24).

Thanks a lot.

CY8CPROTO-063-BLE_OK1.png

CY8CPROTO-063-BLE_OK2.png

CY8CPROTO-063-BLE_NG.png

MuhammadNanda_K
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 50 likes received

Hello @Tom2021 ,

Thanks for your clarification.
We can reproduce this issue in some PSoC 6 devices.
After make several modifications / try on application level, the issue is still there.

We are still investigating this issue.

Thank you and regards,
Muhammad Nanda

0 Likes
Tom2021
Level 1
Level 1
First like received 5 replies posted 10 sign-ins

Hello. Thank you for informing me of the confirmation of the phenomenon.
I hope the problem will be resolved.
Thank you very much.

0 Likes
MuhammadNanda_K
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 50 likes received

Hello @Tom2021,

I am sorry to keep you waiting.

After some internal discussions, it is decided that this issue will be fixed in the new release of SCB.
However this is still in the planning phase and release date is not yet confirmed.

Thank you for your contribution in the community. 🙂

Best regards,
Muhammad Nanda

Hello @MuhammadNanda_K ,
I'm relieved to hear from you that the problem can be fixed.
I look forward to the release of the corrected version.
Thank you for your continued support.

0 Likes