What exactly does not work?
- did you test that your master actually can send data to the PC via UART?
- did you look with a scope / logic analyzer at the I2C signal to see whether the transmission is what you expect it to be?
- Maybe test with other I2C devices to check that you get the I2C code correct
In the master you write -
I2CM_I2CMasterWriteBuf(I2C_SLAVE_ADDR, (uint8 *) i2cMasterWriteBuf,
You have declared the buf to be an array, therefore a pointer, then cast it again to another pointer.
I think you should change write command to -
You do the same thing on the read.
- Master UART is working perfect individually.
- I put CRO on SDA pin, whenever I send a character from PC to PSoC4 through UART, it gives a spike that concludes data transmission is happening from master to slave I suppose.
- I am afraid but I do not have other I2C devices.
A real low cost logic analyzer, works great, very good SW.
I have 2, very useful.