[riot-notifications] [RIOT-OS/RIOT] nrf52/i2c: Use mutex and IRQ for blocking (#14165)

Koen Zandberg notifications at github.com
Fri May 29 15:37:19 CEST 2020


> Did you do some kind of runtime measurements for small i2c transfers?

I did now. My original assumption was that a register read with I2C is relative slow due to the need to transfer the address, then write the register address, restart the transmission with the address and finally read the byte.
I measured the code difference with a logic analyzer and the bmx280 test application on the nrf52dk board, setting a gpio before the blocking bits and clearing it after the blocking bits. This results in the following measurements:

| Type | Master | #14165  |
| ------------- |:-------------:| -----:|
| Read single register | 449.8us | 462.9us |
| Write single register | 336.5us | 352.9us |
| Read long register (24 bytes) | 2.516ms | 2.532ms |

The read long register is 24 bytes of calibration data in the bme280. Note that the default I2C speed on the nrf52dk board uses 100kHz for the I2C clock. I can redo the test on 400kHz if wanted.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/14165#issuecomment-635976685
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200529/52de1e2e/attachment.htm>


More information about the notifications mailing list