some question about I2C slave read/write flash,

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

cross mob
Anonymous
Not applicable

HI ,everybody

      I am using the cypress4000 CY8Ckit-040,when i  use  i2c  to read or wirte  flash,some troubles around me,like the picture:

pastedImage_2.png

     like this ,when i write one byte into flash, i can get the register address and the data will be written into flash easy from  the write_buffer  array.

     but when i want to read "N"Byte from  flash, how can i recognize she is write or read from write_buffer[] ?

     how can i  recognize the write_buffer[2] is  the data will be written  or  the number  of Byte will read?

who can help me?

thanks.

0 Likes
1 Reply
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Generally, PSoC4 uses same buffer for write and read. Which kind of flash are you using? Could you post your full project out? So that someone can help review the code.

Thanks,

Ryan

0 Likes