QSPI transmission problem

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

cross mob
User14049
Level 3
Level 3
Hi,


I am trying to program flash memory using QSPI, each time when I increase data size QSPI transmission get fails.
0 Likes
5 Replies
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored
Your problem description does not provide enough information to understand the issue you have.
0 Likes
User14049
Level 3
Level 3
Is there any time out or buffer limitation on QSPI.
0 Likes
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored
Yes, the FIFO's are only four deep and you can have a Phase Transition (Data Not Available) interrupt. You also have an error interrupt and would know if you had an overrun or overrun on the FIFO's.
Without knowing what you are doing it just guessing...
0 Likes
User14049
Level 3
Level 3
I am using QSPI in polling mode.

Can you share any documents for QSPI.
0 Likes
cwunder
Employee
Employee
5 likes given 50 likes received 50 solutions authored
The user's manual is your best source of information. If you are communicating with an external memory device generally you would configure the QSPI for "continuous long data mode". With this mode you write the BACON register with last = 0. Then you can have multiple data transfers until you have one data transfer remaining but you first write the BACON register only with last=1. This assumes you are controlling the chip select via hardware. Then exchange your last data transfer.

If you are polling (which is not the most efficient as this function is blocking). For the data exchange on QSPI3 you could do something like this:


uint32 QSPI3_ExchangeData(uint32 value)
{
QSPI3_DATAENTRY0.U = value;
while (QSPI3_STATUS.B.RXFIFOLEVEL == 0);
return QSPI3_RXEXIT.U;
}
0 Likes