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

cross mob
TePh_4811091
Level 1
Level 1
10 sign-ins First question asked 5 sign-ins

Greetings - need to transfer 80KB firmware data from an EEPROM (M24M01) to a ST VL53L5CX ToF sensor utilizing a PSoC 4200 series (cy8c4245azi-473) and have a couple Qs?

1. Since I'd be reading, then writing data in chunks, from a PSoC point of view is there any magic number for an optimum buffer size that woks best with the I2C HW?

2 The I2CMasterReadBuf() and I2CMasterWriteBuf() functions...  I went through the examples looking for some guidance and came up empty. I assume I'd still be required to precede those functions with the typical Start/WriteRegisterAddr/etc commands?

TIA,

Terry

0 Likes
1 Solution
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @TePh_4811091

The I2CMasterReadBuf/WriteBuf are high-level APIs and they will internally invoke the I2C start etc. You can check the I2C Master High-Level code example as a reference for your application.

The component datasheet will give information regarding the API - 

Rakshith_0-1651238817932.png

Regarding the buffer size, I think you can use the row size as the buffer size for your particular explanation.

Hope this helps, 

Thanks and Regards,
Rakshith M B

View solution in original post

0 Likes
1 Reply
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @TePh_4811091

The I2CMasterReadBuf/WriteBuf are high-level APIs and they will internally invoke the I2C start etc. You can check the I2C Master High-Level code example as a reference for your application.

The component datasheet will give information regarding the API - 

Rakshith_0-1651238817932.png

Regarding the buffer size, I think you can use the row size as the buffer size for your particular explanation.

Hope this helps, 

Thanks and Regards,
Rakshith M B
0 Likes