How to connect the Pmod™ Type 6A (Extended I2C) to the CY8CKIT-062S2-43012 board?

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

cross mob
SeVl_4673051
Level 3
Level 3
10 replies posted 5 replies posted 5 questions asked

Hi,


ZMOD4510 Air Quality sensor ( US082-ZMOD4510EVZ ) provides a standard Pmod™ Type 6A (Extended I2C) connection. This new standard was introduced last year. I can't find examples of how to connect the Extended I2C to the CY8CKIT-062S2-43012 board or any other similar PSoC6 boards.

 Is Pmod Extended I2C the same as a standard I2C  or is there some specifics to I2C Extended?

Regards,

Sergey

 

0 Likes
1 Solution
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @SeVl_4673051 ,

I have referred the data sheet of sensor ZMOD4510, Extended I2C can be interfaced in normal way as a standard I2C interface and example code has been provided in below link

https://github.com/Infineon/mtb-example-psoc6-i2c-masterhttps://swdocs.cypress.com/html/psoc6-with-a...

 

 

Thanks,

Krupashankar

View solution in original post

6 Replies
Krupashankar
Moderator
Moderator
Moderator
500 replies posted 50 likes received 25 likes received

Hi @SeVl_4673051 ,

I have referred the data sheet of sensor ZMOD4510, Extended I2C can be interfaced in normal way as a standard I2C interface and example code has been provided in below link

https://github.com/Infineon/mtb-example-psoc6-i2c-masterhttps://swdocs.cypress.com/html/psoc6-with-a...

 

 

Thanks,

Krupashankar

Hi @Krupashankar ,

Thank you for the quick reply!

I'll definitely try it.

 

Regards,

Sergey

 

 

0 Likes

Hi @Krupashankar ,

I've tried to integrate it. 

I've used I2C_Master as a starting point. The sample was working well and LED was blinking. Then I've implemented the required code to connect ZMOD4510 and connected it to the board. Unfortunately, it didn't work out as I've expected. Then I've tried to run the original I2C Master and it stopped working too. I'm getting the same issue as described by @BrBr_1320441   in Cannot recover from a failed I2C send start  with the error code 11149316 on an attempt to I2C.

I've tried recommended by @BragadeeshV workarounds and implemented two functions:

void cyhal_i2c_reset(cyhal_i2c_t *obj, const cyhal_i2c_cfg_t *cfg)
{
(void) Cy_SCB_I2C_Disable(obj->base, &obj->context);
(void) Cy_SCB_I2C_Enable(obj->base);
}

void cyhal_i2c_stop(cyhal_i2c_t *obj, const cyhal_i2c_cfg_t *cfg)
{
cy_rslt_t result;

result = Cy_SCB_I2C_MasterSendStop(obj->base, 2000, &obj->context);
if (result != CY_RSLT_SUCCESS) {
printf(" Cy_SCB_I2C_MasterSendStop ret:x%lx ", result);
}
}

But it is still not working for me as Cy_SCB_I2C_MasterSendStart return CY_SCB_I2C_MASTER_MANUAL_ADDR_NAK .

How can I troubleshoot it? Is it possible that the output driver has been destroyed?

Regards,

Sergey

0 Likes

Hi @SeVl_4673051 ,

As I could see NACK from Master device it may be due to slave device  (US082-ZMOD4510EVZ ) as master couldn't get any acknowledgement from slave for that particular address. 

If the slave is not ready to receive the data or is in sleep mode/ turned OFF, the master will see a NACK.

Please ensure slave device is active and has a proper configuration. Could you please refer to reference manual of slave device (US082-ZMOD4510EVZ) and code example for that particular sensor.

Is it possible that the output driver has been destroyed?: Chances are very less basically this couldn't happen. NACK may be due to above reasons stated.

Please try above methods and please let us know if you find any difficulties.

Thanks,

Krupashankar

 

0 Likes

Hi @Krupashankar ,

Thank you for your prompt reply!

I've reverted back to used the I2C_Master project to eliminate potential issues with my code or ZMOD4510. The  I2C_Master project was working before I've tried to integrate ZMOD4510. And now it is not working. This project is only using on-the-board components where both master and slave are on the same kit. And from a connectivity perspective, P6[0] is connected to P9[0] and P6[1] to P9[1].

Just before submitting the reply, I've read the documentation for the project again and I've realized that I haven't set  I2C_MODE to I2C_MODE_BOTH in resource_map.h. After I've set it the I2C_Master example started working as expected. So the output driver and other components of the board are working fine.

And on my ZMOD4510 project I2C_MODE was set to I2C_MODE_BOTH. But now I'll try to set it to I2C_MODE_MASTER and test it again.

Regards,

Sergey

0 Likes

Hello,

I've set I2C_MODE to I2C_MODE_MASTER and now I2C communication is working as expected.

 

Regards,

 

Sergey

0 Likes