Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

SPI Controls

Hi,

i have a bunch of different spi slaves on my bus.

Each of these have a different set of likings.

I have yet to find any way to control the following at run time:

-- Shift direction

-- Data polarity

and so on.

Any of you guys know if this is possible, or is it hardcoded when the cpu is generated?

Thanks,

Agdepus

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    In the standard SPI peripheral supplied by Altera, the shift direction and clock polarity/phase are fixed when you run SOPC builder. You would need a different SPI peripheral to do what you are looking for.

    --- Quote Start ---

    originally posted by agdepus@Nov 12 2006, 03:34 PM

    hi,

    i have a bunch of different spi slaves on my bus.

    each of these have a different set of likings.

    i have yet to find any way to control the following at run time:

    -- shift direction

    -- data polarity

    and so on.

    any of you guys know if this is possible, or is it hardcoded when the cpu is generated?

    thanks,

    agdepus

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=19393)

    --- quote end ---

    --- Quote End ---

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by agdepus@Nov 13 2006, 01:11 AM

    thanks,

    was afraid of that.

    agdepus http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/smile.gif

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=19400)

    --- quote end ---

    --- Quote End ---

    Hi,

    You might have a look to the openCores SPI projet. It should do the job.

    http://www.opencores.org/projects.cgi/web/spi/overview (http://www.opencores.org/projects.cgi/web/spi/overview)

    The core is Wishbone bus interface based but making it Avalon interface based should not be very difficult.

    Kind regards.