Skip to content

Async combinable master can violate STOP-to-START bus-free timing #123

Description

@xross

Description:

When lib_i2c is built with -O3, test_async_master[stop-100-comb-xs3] can report:
ERROR: STOP to START time less than minimum in spec: 4.68e+09fs
The measured bus-free interval is 4.68 µs, below the 4.7 µs I2C standard-mode minimum.
In i2c_master_async_comb(), STOP_BIT_3 waits only bit_time / 4 after releasing SDA. The remaining delay before the next transaction depends on interface scheduling and generated instruction timing. This makes compliance optimization-sensitive.
The async master should explicitly enforce the minimum bus-free interval, similarly to the synchronous master’s compute_bus_off_ticks() calculation, rather than relying on incidental scheduling latency.

Acceptance criteria:

  • STOP-to-START timing meets I2C standard- and fast-mode minima.
  • Behavior is compliant under both -Os and -O3.
  • All asynchronous master tests pass on XS2 and XS3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions