Replies: 4 comments 11 replies
-
|
Hmm, I suspect this might be due to cache line weirdness. IIRC, the transfer can only be done using entirely DMA if it's a multiple of 32 bytes. Otherwise it has to do some using the CPU, then the rest using DMA. |
Beta Was this translation helpful? Give feedback.
-
|
Yes, this is expected behaviour. In the worst case, unaligned QSPI access may be split into three chunks. So try to use 32-byte aligned QSPI access on STM32F7 and STM32H7, if possible. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
.
I recently found out the release of the Mbed CE 7.0 and decided to try it out, as I have a project on hold for Mbed 6.xx.
In this project I use the NUCLEO_H743ZI2 board to connect to FPGA using QSPI for data exchange. With Mbed 6.xx, I found that it was impossible to transfer several kilobytes continuously — there were always breaks during the data transfer. So I was happy to see in the mbed-ce 7.0.0 release notes that "Fixed All STM32 MCU families: QSPI and OSPI drivers updated to use DMA internally. While they still don't support asynchronous transfers, the transfer rate has been substantially improved."
I have redesigned my project for Mbed 7.0 and it seems that now data writing is going well and really faster, but data reading still strange. I do in my code next data reading:
qspi_status_t result = qspi_device.read(RXbuf[1], RXbuf[2], ((RXbuf[0]&0xFF)<<8)|(RXbuf[3]&0xFF), &TXbuf[6], &datalen);Here 4 bytes are sent with a command for the FPGA, and then the datalen bytes in TXBuf must be read.
If the datalen is less than 32 bytes, everything is fine, but if it is larger, there are gaps in the transmission - see, for example, the two screenshots of logic analyser window for 32 and 36 bytes reading, respectively.
And these three data chunks from the bottom figure are always present when I try to read more than 32 bytes - just middle part is increasing with increase of datalen.
Does anyone have any ideas why this is happening?
Or how can I contact the person who changed the QSPI driver code in Mbed CE 7? Maybe he can give me some advice.
Beta Was this translation helpful? Give feedback.
All reactions