Altera_Forum
Honored Contributor
11 years agoHaving trouble with the alt_spi_is_ready() function
Hi,
I've been trying to control a simple SPI LED driver IC using the SPIM0 unit in my cyclone V HPS. The problem is that the alt_spi_is_ready() function doesn't do what I expect it to do. Before initiating a write, my software first calls alt_spi_is_ready() to see if the SPI unit is busy. However, that function always returns 'false', even if the SPI unit is still transferring data. This causes my software to continue writing new words to the SPI unit, causing the previous transfer to be corrupted. I've looked at the Altera-SoCFPGA-HardwareLib-SPI-RW-CV-GNU example code and this project uses alt_spi_is_ready() too. So what am I doing wrong? Has anyone gotten the HPS SPI unit to work properly? I'd like to know.