Forum Discussion
Altera_Forum
Honored Contributor
19 years agoSPI RX problems
Hi I am trying to receive data via SPI on the Nios II using a Cyclone II. The Nios is the slave and the SPI master transmits data at 2MHz. I have tested transmitting data from the Nios ...
Altera_Forum
Honored Contributor
15 years agoYou problem is wrong condition in "if" statement, it sould be (IORD_ALTERA_AVALON_SPI_STATUS(SPI_0_BASE) &ALTERA_AVALON_SPI_STATUS_RRDY_MSK ) == ALTERA_AVALON_SPI_STATUS_RRDY_MSK
Operator & is bitwise, therefore you condition is never equal 1.