cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

JoYa_4324706
New Contributor II

Hi,

I am using PSoC 6 (CY8CPROTO-063-BLE) board to write a very simple I2C example. I am using High Level APIs that Cypress provides and every time I before I try to read a register, I need to write an address to the device first, which is pretty similar to what is described in I2C "read" transactions that start with a write​. However, it doesn't seem to work.

So I would like to ask is it correct to set xferPending in the cy_stc_scb_i2c_master_xfer_config_t to True if I would like to perform such sequence of action? And does the API generates Restart automatically or do I have to do any further action?

Would High Level APIs be able to perform such action? Or would it be recommended to use Low Level APIs instead? Thanks!

0 Likes
1 Solution
Rakshith
Moderator
Moderator

Hi JoYa_4324706​,

Yes, if xferPending is set to true then stop condition wont be generated.

pastedImage_0.png

As the I2C driver automatically generates start or restart condition you need not worry about the restart condition. Can you please share the project so that we can better debug the issue?

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B

View solution in original post

2 Replies
Rakshith
Moderator
Moderator

Hi JoYa_4324706​,

Yes, if xferPending is set to true then stop condition wont be generated.

pastedImage_0.png

As the I2C driver automatically generates start or restart condition you need not worry about the restart condition. Can you please share the project so that we can better debug the issue?

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B

View solution in original post

JoYa_4324706
New Contributor II

Hi RakshithM_16​,

Thanks for the clarification. I think I have it figured out.

0 Likes
Top labels