I2C problem after updating SCB component

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

cross mob
vbas
Level 2
Level 2
5 replies posted First like given 10 sign-ins

I tested the PSoC project for a VL53 sensor (https://github.com/ivladz/VL53L0X_PSoC) with the PSoC 4 I2C SCB_P4_v3_20 component, it worked well, but after updating the SCB component for version 4_20, some APIs stopped working. Such as I2CMasterReadBuf () / WriteBuf (), these APIs have incomplete statuses and the code hangs. New and old components have the same settings, the format of some new APIs is adapted for v4_2 (added timeoutMS and ReadByte () return status errors instead of the value for v_3_20). I've worked with I2C for external timer and FRAM, I haven't had any problems before, I spend a lot of time solving this problem but to no avail. Can anyone help me please?

0 Likes
3 Replies
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @vbas ,

I suppose you are referring to component version 4_0 for I2C configuration of SCB component, since the latest component version I find here is 4_0. Can you please confirm this?

Also, I went through the component datasheet to read about the APIs you mentioned. I found the implementation to be same. However, can you please try explaining us where did you come across this ->"new APIs is adapted for v4_2 (added timeoutMS and ReadByte () return status errors instead of the value for v_3_20). " ? We would be helpful in guiding in a better way after this.

Also, can you please confirm which PSoC Creator version are you using? What are the likely steps, you used in order to update the components?

Best Regards,

Aashita

 

 

0 Likes
vbas
Level 2
Level 2
5 replies posted First like given 10 sign-ins

Hi Aashita,

PSoC Creator is 4.4 version. The steps in my test are:

1. Open the original project https://github.com/ivladz/VL53L0X_PSoC by PSoC creator 4.4 for CY8CKIT-049-42xx, build and test this project, it works well.

2. Connect PSoC Creator with this project to other device CY8C4247AXI-M485 and switch to the device by Project -> Device selector.

3. Update the I2C component Project -> Update Components, SCB P4, last version is 4.0. I need 4.0 because I would like to embed the VL53 project into my project. My project uses SerialNVRAM P4 v1_0 component which cannot work with I2C SCB version 3.

4. Build of this project failed because some APIs require a new parameter - timeoutMS (ReadBuf / WriteBuf). Added parameter for all APIs where it is required. 

5. Build and write to the controller was successful, but the code hangs because the Master status of the ReadBuf API is always 0x04 into VL53L0X.c, function VL53L0X_readReg(uint8_t reg)

Thanks and Best Regards

Vasily

0 Likes
vbas
Level 2
Level 2
5 replies posted First like given 10 sign-ins

Hi Aashita,

PSoC Creator is 4.4 version. The steps in my test are:

1. Open the original project https://github.com/ivladz/VL53L0X_PSoC by PSoC creator 4.4 for CY8CKIT-049-42xx, build and test this project, it works well.

2. Connect PSoC Creator with this project to other device CY8C4247AXI-M485 and switch to the device by Project -> Device selector.

3. Update the I2C component Project -> Update Components, SCB P4, last version is 4.0. I need 4.0 because I would like to embed the VL53 project into my project. My project uses SerialNVRAM P4 v1_0 component which cannot work with I2C SCB version 3.

4. Build of this project failed because some APIs require a new parameter - timeoutMS (ReadBuf / WriteBuf). Added parameter for all APIs where it is required. 

5. Build and write to the controller was successful, but the code hangs because the Master status of the ReadBuf API is always 0x04 into VL53L0X.c, function VL53L0X_readReg(uint8_t reg)

Thanks and Best Regards

Vasily

0 Likes