I've been working with KL25.
I've need to read I2C data from one of our sensors. I used the routines provided in the examples (KL25_SC Rev 6).
The i2c.c code has a small delay function called pause() which does about 40 NOP instructions (see below).
This function is called after i2c_Stop() in the I2CWriteRegister and I2CReadRegister functions.
If you don't call pause(), the system will not function.
In looking at the Processor Expert code, there is no delay function.
So what's going on?
// this delay is very important, it may cause w-r operation failure.
static void pause(void)
for(n=0; n<40; n++);
asm ("NOP"); // Toggle LED1