I2C001 [1.0.22] App supports in GUI Acknowledge Interrupt, but not in API?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello,

I2C001 [1.0.22] App supports in GUI configuration the acknowledge interrupt, but with API functions you will not get the flag (I2C001_GetFlagStatus ...)?


469.attach

I need an interrupt driven I2C-Driver with master functionality to read/write an EEPROM (XMC1300).

Can I find somewhere an example? (not the I2C001_Example1_XMC13)

Or is a higher level APP planed for I2C master communication?

Best regards,
Michael
0 Likes
3 Replies
Not applicable
Hi Michael,

The "Acknowledge received interrupt" is a protocol-related event which will lead to a protocol interrupt. So I think you can check PSR.ACK status flag inside the protocol interrupt ISR (eg. IIC_Prot_Int_Handler() in I2C001_Example1) and clear it using PSCR.CST9. I did not try it before but think this should work. Perhaps you can have a try?!

BR,
Zain
0 Likes
Not applicable
Yes. I already understood.
But I think this should be possible using the API functions.
For example in the GUI, the ACK interrupt can be enabled, but the API function does not provide access to it and you have to work with the register bits.

I think some APPs have only alpha status.

Sometimes I wished there would be a compete library with API functions (eg STM32F10x_StdPeriph_Driver) and I must not use these APPs. 😉

But back to my original question:
Exist a interrupt driven I2C-Driver with master functionality to read/write an EEPROM (XMC1300)?

Best regards,
Michael
0 Likes
Not applicable
Hi Michael,

Thank you very much for the feedback. This is a known issue (eTicket 331504652) which will be fixed in the future release.
Since the ACK interrupt enable bit is implemented in the UI, the protocol interrupt will be generated. What you need to do is to check and clear the status bit as per Zain's suggestion.
I think I2C001 App is suitable for your application as it uses master mode communication. You may refer to "I2C001_Example" on the configuration details although it is built for XMC4500.

Best regards,
Sophia
0 Likes