Skip to content

i2c proxy bug3: SAMPLE_ERROR doesn't reset bit_count #499

@nathanaelhuffman

Description

@nathanaelhuffman
-- line 232-234
when SAMPLE_ERROR =>
    v.state := SAMPLE_IDLE;

bit_count and data_bits are not reset. If the sampler overflows and then re-enters SAMPLE_STARTSAMPLE_DATA, the old bit_count is still 7 and the playback comparison in PLAY_STORED_DATA will immediately think we've caught up. The SAMPLE_IDLE reset case in SAMPLE_START clears bit_count, but only if there's a new start detected before we re-enter SAMPLE_DATA.

Possible Fix: reset bit_count and data_bits in SAMPLE_ERROR.

Again by analysis and simulation. I think this is extremely unlikely to actually occur in a real system as we'll see a new start typically but the fix is easy.

Metadata

Metadata

Labels

No labels
No labels

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