Forum Discussion

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

NIOS II SPI Peripheral

Has anyone had problems or issues of the /SS lines glitching when being switch from one /SS to another? I have four slave devices and when I select a /SS line the previous /SS that was active glitches which is erasing the data within that SPI slave device.

4 Replies

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

    I was just looking into the SPI device. Do you have a capture of this? (I would like to see this). I'll run a test to see if I can cause this as well. Try pipelining that signal and if that doesn't work try debouncing using a few registers with their outputs going through an 'AND' (+ve chip select) or 'NOR' (-ve chip select) gate followed by another register (this is overkill so reduce the logic if you don't need this much debouncing).

    Also are you using the function call 'alt_avalon_spi_command()' or your own implementation (for your problem it doesn't matter, I just want to know how to recreate this)?

    Email me so that I can get back to you sooner.

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

    <update>

    I have finally got around to looking at this and it doesn&#39;t appear to be a bouncing signal, but the previous slave is being selected. If you have a SPI core in your SOPC system then you may want to determine if this is going to cause your logic some problems.

    If anyone needs a fix for this let me know and I&#39;ll provide it.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    This previous glitch is causing a problem. I would like to see Altera fix this with in the SPI peripheral itself and not have to come up with an external fix.