Part Number: MSP430FR2512
Hi There,
I'm using the Captivate REGISTER_I2C interface, with the IRQ feature for notifying the host MCU. I do this with the utility function, I2CSlave_setRequestFlag() (which seems to do the thing).
My question is that on the host MCU, I was triggering on falling edge (the line is held high and gets pulled low, so the falling edge is the SOONEST I can be notified) but I notice that between my request and response i2c requests I need to add ~ 30ms delay in order to get a valid sensor packet.
Switching to the positive edge allows me to remove the delay.
Questions:
1) Which edge should I trigger on?
2) What is the anticipated delay between the request / response?
3) Should I be waiting, or should I pull the i2c response until I get a valid checksum?
4) Should I be doing something else I'm not doing instead?
Putting timing code in feels inherently fragile to me, so I'm hoping someone can enlighten me as to what can be done to make the response as fast as possible while being reliable. My clock speed is 100kHZ, and I'm (for the moment) using internal pullups on the i2c lines.
Thanks!!