I2C problem on Cypress PSoC3 (with EEPROM and FRAM too)

Hello,

I am working on a Cypress MCU (CY8C3866AXI-040), and I have a problem about I2C. I'm trying to create an I2C communication with an external EEPROM (and an external Cypress FerroRAM too). I have already watched all the default example codes of Cypress about I2C. In the following code, I send 8 byte to the FRAM, then try to request these bytes from it. All 3 commands seems to be succeeded, because I got master status 0. But I can't see the result. The read buffer remains its original content. What is wrong in my code?
(The hardware set up and the I2C configuration (in the top design: UDB, internal clock source, 100 kbps) are OK)

Thanks

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define I2C_DATA_CNT 8u
#define I2C_WR 0u
#define I2C_RD 1u
uint8 mr_status = 0;
uint8 dev_sel = 0xA0; // 1010 00 0 0
uint8 location[2] = {0x00, 0x00};
uint8 wr_buffer[I2C_DATA_CNT+2] = {0x00, 0x00, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B};
uint8 rd_buffer[I2C_DATA_CNT] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87};
I2C_1_Start();
UART_1_Start();
while(1)
{
if(UART_1_RX_STS_FIFO_NOTEMPTY) { // Input character
rx_buffer = UART_1_GetChar();
if(rx_buffer == 0x77) { // typing 'w': write
dev_sel = 0xA0;
mr_status = I2C_1_MasterWriteBuf(dev_sel, (uint8*) wr_buffer, sizeof(wr_buffer)+sizeof(location), I2C_1_MODE_COMPLETE_XFER);
while(!(I2C_1_MasterStatus() & I2C_1_MSTAT_WR_CMPLT));
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

0