Is there anyone with experience in doing this?
I'm writing a bootloader host program inside linux user space to talk the PSoC slave touchpad through I2C. I'm setting up the communication channel with ioctl commands and then using a the simple read and write functions to talk to it. The read command defaults to a register read (So, Write- [Slave Addr][Register Addr] Read- [Slave Addr][Read Data]). Looking at some of the data sheets on communication with the bootloader, when the host is trying to talk to the bootloader and it wants to read the response package from the bootloader there is no initial write command because it isn't trying to access the register. It looks like the host program is just supposed to send the slave address with the read bit set and then read out the response.(So, Read- [Slave Addr][Read Data]. As a result I've been getting communication failures when attempting to read a response.
Is this the correct way to interface with the bootloader? Are their linux commands that don't involve an initial register write and just force a read?
Is the command is based on smbus?? Something like i2c_smbus_read_byte_data() ? Smbus protocol has register write operation before read to specify the register location. As you said that may be causing the issue. Did you find any i2c specific functions in your header file? Please share the header file you are using.
One more clarification required : How you have set up the hardware ? How you are connecting it PSoC to your PC ?