Skip to content

RP2040: use DMA for large I2C transfers in busio #6431

@s-ol

Description

@s-ol

There is ongoing discussion about multicore support on RP2040 #4106; whether it's really necessary or how the situation can be improved by grabbing lower-hanging fruit. I've done a little bit of profiling on my project and found that my biggest bottleneck right now is the i2c display: In my project, the displayio update takes ~44ms when a change happens, which is unacceptable for a realtime application.

In #4106 I saw this comment which surprised me:

@ladyada:
displayio is also handled in the background with DMA...

Looking into ports/raspberrypi/common-hal/busio, I can see that SPI supports DMA for transfers over 32 bytes, whereas I2C doesn't. It seems that I2C is somewhat more difficult to set up, or at least there are no examples to be found readily, but this would be a big improvement for I2C display modules, such the monochrome oled displays sold by Adafruit.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions