Writing code for SPI master - CYpress PSOC4.
Currently I have a shorted ,MOSI and MISO lines to test basic SPI communication. In technical manual they have given one of these below steps for SPi initialization .i need more details on these registers.umable to get clarity in these registers.
Problem: Value loaded into tx write register is still empty.
From reference manual:
15.2.6 Enabling and Initializing SPI
The SPI must be programmed in the following order:
- Program the transmitter and receiver FIFOs using the SCB_TX_FIFO_CTRL and SCB_RX_FIFO_CTRL registers respectively, as shown in Table 15-5:
a. Set the trigger level.
b. Clear the transmitter and receiver FIFO and Shift registers.
c. Freeze the TX and RX FIFO
But unable to understand the above register values. Also need more details on WR_PTR,RD_PTR,SR_VALID,USED.
Unable to write data in SCB_TX_FIFO_WR.Am missing these register settings.