Request guide and example of using SPI with interrupt | Cypress Semiconductor
Request guide and example of using SPI with interrupt
I am using the CY8CKIT-042-BLE development board with the CYBL10573 BLE module board. And I am using the PSoC Creator 3.3 IDE for the development.
I am writing code for the PRoC as a SPI master to control a LCD. I can send data out by using the xxx_SpiUartPutArray() API function. However I do not know how to check when it finish sending the whole packet of data. On my previous experience, usually there are two ways:
1. keep checking a "BUSY" flag in a while loop, when the transmission is finished, it break out from the loop
2. Set up an transmission end interrupt.
I have looked the example code generated by the PSoC Creator, but I could not found a SPI examples using the above method. Instead, the code examples always assume there is a slave which will feedback data, and it check whether the number of byte transmitted is equal to the number of bytes received. However in my case the LCD will not feedback anything.
Could you provide guide and code example?
Frankly, the PSoC Creator generate a high level of abstraction code, but lack of detail explanation of using the API (Or it is very difficult to find them). I have also used Atmel, which use the same kind of abstraction, but I can find all examples for every MCU in its IDE. When I started to write the Atmel M0 MCU the first time, I can use only one day to drive all simple peripherals.