Forum Discussion
Altera_Forum
Honored Contributor
10 years agoNIOS II SPI communication
Hi All! I've a problem with Nios SPI communication. I studied "Embedded Peripherals IP User Guide" but I didn't understand how to use alt_avalon_spi_command() function. I understood that an Avalon...
Altera_Forum
Honored Contributor
10 years agoThe difference should be clear from the description in the user guide? alt_avalon_spi_command() performs the sequence of actions described in the manual, while IOWR_ALTERA_AVALON_SPI_TXDATA() just writes the TXDATA register.
You can read the source to the alt_avalon_spi_command() function and see how it uses IOWR_ALTERA_AVALON_SPI_TXDATA() and everything else that it does to gain better understanding. There is also an example use of the function here: http://www.alterawiki.com/wiki/spi_core