Hi,
I have some troubles using TWI easy DMA. I set EASY_DMA flag to 1, but I can't see any results in my performance tests. Can anyone explain me the required steps?
Thanks!
Hi,
I have some troubles using TWI easy DMA. I set EASY_DMA flag to 1, but I can't see any results in my performance tests. Can anyone explain me the required steps?
Thanks!
Hi Martin,
I'm measuring the max running time of a task which sends buffers through twi interface. It takes too long (2-3 milliseconds). I got the same results after using easy DMA. I'm not sure I did the right things.
Thanks
Hi Roei,
What frequency have you configured the TWI bus to run at?
If you are able to transfer 24 bytes every 1 ms, this corresponds to 192 kbit/s. The maximum supported frequency of the TWI peripheral is 400 kbit/s.
With the handshaking on the bus and other overhead in the peripheral, this throughput might not be that far from the limit.
How large packets do you send in each transfer?
The configured frequency is 400k. I'm sending packets of 35 bytes.
Hi Roei,
That's not that too big of packets, could you test with 255 to see if you get any higher throughput.
(btw. the nrf52840 supports 16 bit MAXCNT register, so you could send 65535 bytes in one transfer)
Anyway, the TWI has to send an address for each new transfer, including start/stop/repeated start bits which takes throughput.
Most likely it takes a few µs each time you have to update the buffer, etc. You should also make sure that you do not do anything special in the callback handler that could slow things down. (Like logging etc.)
Hi Martin,
I don't use any callback handlers.
I think our first step should be indicating easy DMA activation. Maybe I didn't do the right steps. I can't see any difference after using easy DMA, so it's strange.