This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unable to write 8210 bytes on I2c bus

Hi,

I am facing the issue of sending 8210 bytes of data to my slave device.

I am using NRF52840 interfaced with the MAX32664 maxim sensor hub.

I tried both approaches to transmit data with a legacy as well as easyDMA enabled case.

On the forum, I found a similar case on this link "i2c message max buffer size - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)" however could not resolve the issue.

observation made on the saleae logic analyzer:

when tried to transmit 

1)8210 bytes - it sends the first 18 bytes data + write address

2)8192 bytes - it sends the 0 bytes of data + write address (code gets stuck)

3)8191 bytes - it sends the first 255 bytes of data + write address 

4)8190 bytes - it sends the first 254 bytes of data + write address 

5) 7936 BYTES - it sends the 0 bytes of data + write address (code gets stuck)

I am failing to understand this buffer overflow at multiples of 256(case 2 and case 5).....

I did try sending the data into chunks of 200 without issuing stop byte and at the end of 8210th byte sent the stop bit, but the slave responds with an illegal command sequence error.

Info:

NRF52840 custom board 

NRF SDK17 is used

18 bytes + write address

255 bytes +write address

Parents Reply Children
No Data
Related