Forum Discussion
Altera_Forum
Honored Contributor
14 years agoSPI Problems
Hi, I'm trying to get handle with the SPI on a Nios II Core but I don't get it. I have a SPI master and a SPI Slave that I can try to transmit some data from the master to the slave. I connecte...
Altera_Forum
Honored Contributor
14 years agoI don't know about your board schematics, so I can't check your signal to pin connections.
Routing mosi signal to a LED is useless: you would never be able to see it (or maybe are you kind of guy sensitive to kryptonite? are you? :D) You must use an oscilloscope to test it. If you do, test especially the sclk signal. If you can't afford an oscilloscope, you can SignalTap the design. Focus on sclk and ss signals, not on mosi. SPI registers seems to indicate that the master has correctly transmitted data, but the slave has received nothing. Moreover, slave status shows an overrun error. This is usually due to a missing sclk or unasserted ss on slave side. Writing anything to slave status register should clear the overrun error. Clear it and verify if your spi command code set this error again.