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 agoYour code contains several mistakes:
IOWR_ALTERA_AVALON_SPI_SLAVE_SEL(SPI_SLAVE_BASE,0x04) This doesn't write data to the slave, but it selects (enables) slave whose address is 4 for receiving data SPI slave is not supposed to transmit data autonomously. It sends data upon reception of a master request. You both send and receive data on slave. I think you meant send with master and receive with slave.