Hello dpiessens.
First I'll explain the SPI interface so that there is no misunderstanding about how it works (since it happens a lot).
SPI is fully duplexed so when you need to write data it reads back data at the same time. When you read data it has to write data at the same time. A SPI master is capable of accessing up to 16 SPI slaves. A SPI master is capable of starting a transfer whereas the slave cannot (slave just reacts to the master). If you have multiple slave devices in your system that will be read by the slave master you must buffer their MISO (master in slave out) signals/pins using the slave select signals and tristate buffers.
Now before I go further I need to ask the million dollar question. Are you using a SPI configured as a master device or as a slave device? The hardware is different and the HAL code only works for SPI masters.
I also recommend giving this a read:
http://www.altera.com/literature/hb/nios2/...pu_nii51011.pdf (
http://www.altera.com/literature/hb/nios2/n2cpu_nii51011.pdf)
I'm pretty busy now so I'm not checking the forum very often so if you need more help contact me by email.
Good-luck