I've working I2C communication from my PSoC 4 as I2C master, with si1153 proximity sensor as slave, however I'm polling in main loop for a flag that will be set on falling edge from slave device specific pin. If this flag is set, I'm doing a block read.
If I try to perform the block read directly from the pin ISR, no I2C communication is performed? I would like to have ISR triggered I2C read method without the need for polling to be as fast as possible, how can I achieve this?
This doesn't do anything:
Si115xBlockRead(0, SI115x_REG_IRQ_STATUS, 13, buffer);
We would like to review your code Si115xBlockRead() to find out the issue. Can you please share your project in this forum so that we can debug the issue.
Also, are you using high level or low level APIs to perform transfer? High level APIs work on interrupts and therefore if the priority of the I2C is less than the priority of the pin interrupt, then your I2C ISR will not be executed and the communication will not happen. Can you ensure that the priority of I2C is greater than the priority of the pin interrupt?