I am using the nrf9160DK and I am implementing on zephyr.
For my application I need to write to an external flash memory through I2C. I need to write one page at a time + CRC bytes. In total I need to write 8210 bytes.
However using a logic analyzer I noticed that when I tried to send 8210 bytes, the 9160 actually wrote 18 bytes. When I tried to write 8192 bytes the 9160 wrote 0 bytes and when I tried to write 8191 bytes the 9160 wrote 8191 bytes. So it looks like uart message length "overflows" at 8k bytes.
My question is:
Is there a built in max length for i2c transactions? is that 8k bytes? Is there a way around that?
The transmit buffer of the nRF9160 has a maximum value of 0x1FFF or 8191 bytes. Please see TWI Master Write Sequence for more information
So to work around that, I would have to use EasyDMA? Are there any examples of that or how to use EasyDMA or TWIM instead of "traditional" I2C using zephyr ?
Can you please provide the name of the device you are trying to interface? Or a datasheet? How are you using the I2C? You should use commands found in: zephyr\include\drivers\i2c.h
The device I am trying to interface with is max32664C. I am trying to flash the application firmware for it.
I am using zephyr\include\drivers\i2c.h.
From what I see you will need to divide the data into chunks of let's say 1000 bytes. You will then need to write each chunk without a stop condition (opposite of what I first wrote), then on the last chunk, you write stop condition.
We are trying to interface nRF52832 with max32664C using i2c. While writing 8210 bytes, only 18 byes succeeds.
Facing same issue.
Have you resolved the issue and what is the solution?
I am trying to write the .msbl file to max32664c interfaced with nrf52840 and having the same issue.
I am unable to write 8210 bytes in one go and in chunks it throughs an error.
Have anyone resolved this issue.