Forum Discussion
Altera_Forum
Honored Contributor
9 years agoI think that one mistake I made was that I created an SPI slave rather than SPI master to write out signals. I've changed the SPI from slave to master, but still it doesn't work. I have the following code that basically runs if an button is pressed:
if (print_cnt == 1) printf("LED Pattern 1\n"); alt_u8 tx = 10020; alt_u8 rx = 0; return_code = alt_avalon_spi_command(SPI_0_BASE,0 , 1, tx, 0, rx, 0); For some reason, this causes the FPGA to get stuck and stop working. Any thoughts why?