-
Notifications
You must be signed in to change notification settings - Fork 65
Description
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.

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.

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.