embeddedsw icon indicating copy to clipboard operation
embeddedsw copied to clipboard

Issue with XSPIPS_FORCE_SSELECT_OPTION

Open dhylands opened this issue 3 years ago • 1 comments

Currently, the spips driver, in both the XSpiPs_PolledTransfer and XSpiPs_Transfer calls XSpiPs_Enable() AFTER setting the chip select. It should call XSpiPs_Enable BEFORE setting the chip select.

Calling XSpiPs_Enable causes SCLK to goto the polarity determined by CPOL and this needs to happen BEFORE the chip select is selected, otherwise you may get a spurious edge on a selected device.

This isn't a problem if you're not using XSPIPS_FORCE_SSELECT_OPTION since then the chip select won't activate until data is in the TxFIFO, which is AFTER the peripheral was enabled.

dhylands avatar Jul 22 '22 22:07 dhylands

What's funny about this is, while it has been fixed - the reset value in the XSpiPs driver causes the first transaction to still exhibit this behavior.

jwolfm98 avatar Mar 27 '25 02:03 jwolfm98