Skip to content

Ambiguity in use of cs_wait field in SPI_CMD_SOT vs. wait_cyc from SPI_CMD_WAIT in udma_spim_ctrl #351

@cst-aditya

Description

@cst-aditya

As per the RTL implementation, The SPI_CMD_SOT command implementation in udma_spim_ctrl can consume a prgrammable delay defined by SPI_CMD_WAIT. This implementation seems confusing for the below reasons: -

a) SPI_CMD_SOT has a cs_wait field that is not used anywhere; rather, SPI_CMD_WAIT is used.

Image

b) If it is correct to use SPI_CMD_WAIT instead of the cs_wait field of SPI_CMD_WAIT, then there should be code to check whether the cd_wait_cyc are for clock-based wait or event-based wait. In the case of the SPI_CMD_SOT command, the wait_cyc field of SPI_CMD_WAIT is used blindly.

Image

c) Using the wait cycle from the SPI_CMD_WAIT command instead of the SPI_CMD_SOT command puts an additional constraint that the SPI_CMD_WAIT command should come before the SPI_CMD_SOT command. Using the wait field of SPI_CMD_SOT should have been sufficient here.

Kindly review and confirm the implementation. It is not clear whether this is intentional or a typo.

Metadata

Metadata

Labels

good first issueGood for newcomersquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions