TC377TP - QSPI Unexpected Configuration Error

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Marelli_1
Level 1
Level 1
10 sign-ins First solution authored 5 sign-ins

Hello Support team,

I'm tying to send data using long data mode as described in (P1736/1737 of the RM).

 

Here is an overview/description of how I'm using the QSPI:

 

  • First attempt:

-----------------------------------------------------------------------

Bacon(with LAST=1)      |      Data      |      Data      |      Data               

               32bits                    |     32bits    |     32bits   |      32bits        --> = 128 bits in a frame 

------------------------------------------------------------------------

with this approach I'm getting TXFIFO overflow (software error). and the chip select is not set correctly (I can see that from oscilloscope)

 

 

  • Second attempt:

Somehow I need to do the following set the BACON.LAST twice , in order to have a clean chip select (but I still get Unexpected Configuration Error )

----------------------------------------------------------------------------------------------------------------

Bacon (with LAST=0)      |        Data            |        Data      |      Bacon (with LAST=1)   |          Data           

                32bits                    |        32bits        |         32bits   |                     32bits                    |          32bits        --> = 160 bits in a frame 

-----------------------------------------------------------------------------------------------------------------

 

Can you please help to figure out, why do I get these Errors?


Best regards.

@Jeremy_Z 

0 Likes
1 Solution
Marelli_1
Level 1
Level 1
10 sign-ins First solution authored 5 sign-ins

Problem solved, I had to set PISEL.MRIS to 1 (MRST input line B is selected for operation).

Now I can see my DATA

View solution in original post

0 Likes
3 Replies
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored

I am not clear on the number of bits that you want to send within one actuation of the chip select (frame). Is it 128 bits or 160 bits?

I am going to refer to the TX_FIFO but you must choose to use MIX_ENTRY or BACON_ENTRY & DATA_ENTRY modes to actually write to the TX_FIFO.

In your first attempt. To send 128bits in long mode you need (BACON.CS=chip select matching the ECONz, BACON.LAST =1, BACON.BYTE=1, BACON.DL=15 (for 16 bytes). You must write WORDS to the TX_FIFO. Meaning you must pack the bytes so that you only transfer in words this means you need to pay attention to the endianness of the bytes. You also need to pay attention to the room you have in the QSPI FIFOs they are only 4 words deep. When writing the BACON it also go through the TX_FIFO so you need to make sure you have room to write it and then the 4 data words (i.e 128 bits). This means you write the BACON followed by the 4 words and you will see the 128 bits within the CS frame.

For your second attempt you can stay with the "Short  data mode" since you are going to be changing the BACON.LAST bit. For the short data mode every write to the TX_BUFFER is equal to the BACON.DL value. 

Here is an example to send 63-bits in a frame using the Short Data Continuous mode.

cwunder_0-1682883320136.png

 

 

0 Likes
Marelli_1
Level 1
Level 1
10 sign-ins First solution authored 5 sign-ins

@cwunder  Thank you very much for your detailed answer.

I decided to use the Continuous Data Mode with Short Data. The communication with the slave seems to work fine.

But when I read the RX-FIFO with software I always get 0xFFFFFFFFU.

I do Read the RX_FIFO as follows:

* write in TX-FIFO

          psPERI->DATAENTRY[x].U = myData

wait until RXFIFOLEVEL > 0

         while loop

* read RX-FIFO

         myRxBuffer[x] = psPERI->RXEXIT.U;

 

Also I do not get any Error-Flags set, all of them are inactive.

Can you please tell me why I only get FF from the RXEXIT register even though I don't get ErrorFlag, like RXFIFO underflow

best regards

0 Likes
Marelli_1
Level 1
Level 1
10 sign-ins First solution authored 5 sign-ins

Problem solved, I had to set PISEL.MRIS to 1 (MRST input line B is selected for operation).

Now I can see my DATA

0 Likes