- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the Modustoolbox 2.4 with PSoC4.
The PSoC4 I2C Slave has an observable strange behavior:
With a sufficiently large buffer allocated to Cy_SCB_I2C_SlaveConfigWriteBuf(), the write buffer will have no size issue for the I2C Master to write the data. There should not be any data overflow.
The Cy_SCB_I2C_SlaveGetWriteTransferCount() will report Length Received less than the I2C Master byte sent. This causes some of the master I2C data to be lost. The interrupt event is 0x20 indicates that I2C Master has finished writing the data. Within the interrupt service, the I2C status is 0x60. This indicates that master attempted to write more bytes than space available in the configured Write buffer.
Master I2C Byte length Sent |
I2C Slave Reports Byte Length Received |
1 |
1 |
2 |
2 |
3 |
3 |
4 |
4 |
5 |
5 |
6 |
6 |
7 |
7 |
8-16 |
8 |
17-24 |
16 |
25-32 |
24 |
33-40 |
32 |
41-48 |
40 |
49-56 |
48 |
57-64 |
56 |
Please check and see if the Modustoolbox 2.4 CY_SCB_I2C_SLAVE library needs any update.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have managed to resolve my issue while tracking back from the original sample code. It turns out that I did some printfs in the Interrupt handler which cause this strange behavior. Removing the print statements resolve the isssue. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @GaryLim,
This is a strange behavior. Can you confirm whether the configuration/parameters of master goes in hand with the slave? Can you share a project where you observe these differences?
Regards,
Nikhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have managed to resolve my issue while tracking back from the original sample code. It turns out that I did some printfs in the Interrupt handler which cause this strange behavior. Removing the print statements resolve the isssue. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @GaryLim ,
Glad your query is resolved.
Feel free to post any queries or issues you may have on Infineon products in the community and we will be happy to help.
Regards,
Nikhil