Skip to content

Confusing comment on the pio_i2c example #673

@ithinuel

Description

@ithinuel

The PIO comments in i2c.pio state that:

; The TX FIFO should be accessed with halfword writes, to ensure
; the data is immediately available in the OSR.

In the c-sdk, the Tx FIFO is declared as an array of 32bit write only integers but the c code in pio_i2c.c goes some length to do 16bit writes.

This is a confusing claim as 32bits writes are expected to be atomic anyway.

I could not find information in the datasheet to confirm or deny that statement.

  • If that is really necessary the datasheet should be updated with some explanation as to why this is required.
  • If not the comment in i2c.pio should be amended and the code in pio_i2c.c be simplified.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions