You try to clear the interrupt in a wrong order. Datasheet tells that a I2C_ClearRxInterruptSource() cannot clear a FIFO interrupt under certain conditions (see page 176) So you have to read off the data from FIFO first (until it is empty) then clear the interrupt.
I strongly suggest you not to make changes in the generated files. You may keep your complete interrupt handling in main.c when you use the isr_StartEx() instead of isr_Start().
Hey Bob thanks for the quick answer! Ok I didn't know that one. Guess it applies for SPI too (not using I2C ;) But what datasheet are you talking about? The one I get from PSoC creator SPI component doesn't even list all available functions ... And no DS I find concerning the CYBLE module is really more than 70 pages ... so what Datasheet that has 176 pages do you have? Might also fix further questions if I get that datasheet :S because I really tried finding out by the DS I got.
Also: I just put code where the comments in the generated c file said to put code there. I hope that's ok. I don't like to have all in one main.c. Also: I do use my own isr handle but I use it with isr_SetVector(); and isr_Start(); I will change to what you suggested tho :)
Thanks a ton!
Also: I just put code where the comments in the generated c file said to That was the "formerly" used way. Because customers complained (justifiably) that all code does not survive component or Creator updates Cypress changed the way to do that.
1st. Using the StartEx() API for interrupts allows the handlers to be kept in your own sources (not required to be in main.c)
2nd. Callback macros allow for usercode (yours) to be executed even when not triggered by an interrupt. For the concept look in Creator Help.
Datasheets: The PSoC4 Serial Communication Block (SCB) v 3.0 datasheet has got 200 pages.
The search function in the forum here gives only a limited help (too many hits). Within your Cypress PSoC installation you can find a "Cypress Document manager" which is able to dig out app notes, datasheets and whatever you ask for in a quite convenient way.
Thanks very much, your advice worked like a charm! Search function is very awesome, sadly didn't help me on my next problem with the timer because I can't see my difference to the example ... yeah I am bad ...
I also found where it's written in the Datasheet ... I must have overread it ... because it's explained pretty clearly. What I do not get is why it has this behavior. It is VERY unintuitive. Other than reading the entire 200 pages you wont figure that one I guess.
Also I don't know what your problems with component updates is :) it doesn't delete my code :)