0

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:

  1. 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.

enter image description here

enter image description here

enter image description here

Manju
  • 73
  • 5
  • It is unclear what you don't undestand. English in the data sheet or something else? – 0andriy Jun 06 '21 at 20:05
  • What do you not understand? What more "detail" could there possibly be than what is provided in the technical reference manual? What does "_Unable to write data in SCB_TX_FIFO_WR. Am missing these register settings._" mean? Better perhaps to explain what you are trying to do and present your code as it and explain what does not appear to be working. – Clifford Jun 06 '21 at 20:07
  • Hi Both,thanks for the reply.I have updated questions.Pls have a look – Manju Jun 07 '21 at 01:52
  • Is this your question? "Why is the register `TX_FIFO_WR` empty in the debugger view, even if I write some value to it?" – the busybee Jun 07 '21 at 06:21
  • If I write a value,it's not showing any value. – Manju Jun 07 '21 at 06:51
  • It's on your screen shot: **register is write only**. – 0andriy Jun 11 '21 at 20:28

0 Answers0