SPI not waiting for completion | Cypress Semiconductor
SPI not waiting for completion
I am using the SPI slave module on a CY8C24423A. This has been working fine for several years, but now I seem to have changed something in the SPI master, because NONE of the PSoC SPI slaves are responding to it.
After the chip select is detected, the PSoC loads a byte into the SPI buffer, then waits for the SPI transaction to complete:
mov A, 0x06 ; MSB First SPI mode 3
Mov A, %10101010 ; Load a byte into the SPI
SPI_Wait: ; Now wait for the SPI transaction to complete
AND A, 0x20 ;0x20 = 'SPI Done' status mask
However, the SPI_Wait loop exits immediately, even though there no clock edges have appeared yet. I have verified this on a 'scope.
Any ideas why the loop might exit immediately?