Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPI "Manual Operation useful for Bulk transfers" seems to do nothing #2124

Open
YusufCelik opened this issue Nov 11, 2024 · 1 comment
Open

Comments

@YusufCelik
Copy link

YusufCelik commented Nov 11, 2024

The following code: litex/litex/soc/cores/spi
/spi_master.py

Contains:

("``0b1``", "Manual operation (CS handled by User, direct recopy of ``sel``), useful for Bulk transfers.")

One would assume that one could now simply set CS to low manually and then do mosi_write. However, it does nothing. I am still forced to use the SPI control register:

            CSRField("start",  size=1, offset=0, pulse=True, description="SPI Xfer Start (Write ``1`` to start Xfer)."),
            CSRField("length", size=8, offset=8,             description="SPI Xfer Length (in bits).")
        ])

However, does this not defeat the whole purpose, why not directly use SPI controlled transfers? Obviously it is slower, hence I am really curious what a Bulk transfer implementation looks like. Spi_master.py seems to suggest that the "Manual operation" flag is meaningless. Can you please elaborate?

@AndrewD
Copy link
Collaborator

AndrewD commented Nov 15, 2024

Bulk transfers are where CS is asserted, then more than one byte is transferred, then CS is de-assarted.
Some usages of spimaster have cs asserted and de-assarted for every byte, or deasserted when not busy (if a fifo underruns for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants