Hi Everybody,
I'm using two FRDM-KL03Z Eval. Boards for I2C communication by runing the SDK driver examples for i2c interrupts (i2c_interrupt_b2b_transfer_master & i2c_interrupt_b2b_transfer_slave).
In this examples the bit FACK=0, so every byte of data, the slave is receiving, gets acknowledged automatically.
I want to be able to decide on my own whether ore not the data gets acknowledged.
Therefore I set the FACK bit of the slave to 1 after there is an address match. My idea was to read from the data register and put a 0(ACK) ore 1 (NACK) to TXAK, depending on the content of the data register.
That is the only things i changed in the examples.
If I debug it step by step it behaves as expected, but if it "runs" on its own there is a problem.
The master sends a byte of data, but the slave doesnt get into the I2C_SlaveTransferHandleIRQ function, even though the IICIF bit is set, only if I pause the slave and let it continue afterwards.
And even if it gets into the IRQ, the TCF bit is not set.
Are there any additional configurations i have to make to get it to work?
Seems like it is some kind of a timing issue?!
Thx in advance,
Lukas
Hi Lukas Klinger ,
Please also tell me which detail code you have modified in the SDK slave I2C interrupt project.
When you test the code, do you run the SLAVE side at first, then run the master code?
Do you also test the I2C bus wave, when your slave meet the problems, what's the I2C wave now?
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-----------------------------------------------------------------------------