Skip to content

i2c_samd0.c burst write not compatible with ssd1306.c #36857

@Tubbles

Description

@Tubbles

Running Zephyr with a SSD1306 compatible OLED screen does not work over I2C

I am running with a seeeduino xiao and its accompanying dev kit which features a SSD1306 compatible 128x64 pixels OLED screen, accessed over the I2C bus.

Comparing with a similar library from the Arduino ecosystem I saw that the I2C packets of Zephyr was incorrectly chopped up into smaller chunks. I tracked it down and it seems that it comes from the usage of i2c_burst_write(), but I don't know what is the supposed behavior of the I2C driver. Is it okay for it to inject STOP conditions between each I2C message? There is a warning in the header file which seems to indicate that it is.

To Reproduce

  1. checkout the below zephyr version
  2. apply the changes in the below attached patch (except the one for the ssd1306.c file which contains a workaround)
  3. unpack blinken.zip below
  4. west build -b seeeduino_xiao
  5. west flash
  6. See error

Expected behavior
A stripey pattern on the display

Impact
Showstopper for any application using this driver combo (and possibly others with the ssd1306?)

Logs and console output
Expected comms:
image

Actual comms:
image

Environment (please complete the following information):

  • Manjaro Linux
  • zephyr-v2.6.0-740-gc32a96af6ade

Additional context
0001-seeduino-xiao-add-i2c-support-fix-ssd1306-burst-writ.patch.txt
blinken.zip

Metadata

Metadata

Assignees

Labels

area: I2CbugThe issue is a bug, or the PR is fixing a bugplatform: Microchip SAMMicrochip SAM Platform (formerly Atmel SAM)priority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions