Dear Mike,
The goal is to increase the write speed.
Using the ordinary writing through AHB gives us the very slow speed -
around 10..11us for writing 1024 bytes.
It means that the speed is 100MB or even less. For reading (if we
increase the buffer size up to 1024 byte) the speed is around 4..5us,
which means 200..250Mbytes for reading.
The reason of this so slow speed during writing is that the physically
transaction size to Hyper RAM is only 8 bytes for each transaction.
The main idea is to increase this size as many as we can (for reading
the transaction size can be increased up to 1024 bytes).
IP engine has 128 bytes FIFO for reading and writing. And additionally
it has an opportunity to use these FIFO via AHB bus.
I have made small modifications in the AN12239SW example:
- increase the watermark level, IPRXFCR.RXWMRK= 15 (128 bytes),
IPTXFCR.TXWMRK=15 ((128 bytes).
- set MCR0.ATDFEN=1 // Enable AHB bus write to IP TX FIFO
- make some small modifications in the working example (below):
Everything works fine if the source buffer lays both in the DTCM and the
OCM memories.
The speed increases around twice.
But if I do some minor modifications:
in fact, using only memcpy function instead of for() loop, it works fine
if the source buffer lays in DTCM, but doesn't work if it lays in OCM
(location 0x2020'0000).
I try to use cache or switching it off, it doesn't effect anything.
The read data:
I have checked what is working incorrectly: reading or writing. It's
writing (I have checked reading procedures many times).
Can you explain that? What do I do wrong?
Thanks for your support.
Best regards,
George Volokh.