2024-04-16 01:29 PM
@Alex - APMemory I am trying interface APS6408L on the B-U858I-IOT02A Discovery Kit in OSPI DTR memory mapped mode for both read and writes. The datasheet for APS6408L mentions that the page size for it is 1Kb.
In the memory mapped mode, is it possible to write in a chunk greater than 1Kb for the RAM? I am read this for the memory in the datasheet,
"Burst Type & Length
Read and write operations are default Hybrid Wrap 32 mode. Other burst lengths of 16, 32, 64 or 1K bytes in
standard or Hybrid wrap modes are register configurable(see Table 20). The device also includes command for
Linear Bursting. Bursts can start on any even address. Write burst length has a minimum of 2 bytes. Read has no
minimum length. Both write and read have no restriction on maximum burst length as long as tCEM is met."
I am using memcpy for writing the data in the memory mapped mode. My question is, is it possible to write in blocks greater than 1Kb for this memory?
-Rikesh
2024-04-17 03:57 PM
Sorry, you're not wanting to perform 1kB+ bursts, i.e. as a single synchronous access. You're only wanting to be able to read/write pages of flash using as many bursts as that would require.
2024-04-17 09:20 PM - edited 2024-04-17 09:25 PM
@alister , I am using the driver for the APS6408L PSRAM from the ST https://github.com/STMicroelectronics/stm32-aps6408.
I am also using the BSP driver for the OCTOSPI from ST https://github.com/STMicroelectronics/b-u585i-iot02a-bsp
I did not make any updates to the driver and I am using them as it is in the ST github repository links that I have provided above. Therefore, I believe the memory mapped that I am using is as RM0456 rev 5 section 28.
When I mentioned enabling/disabling the DCache, I was just trying to mention that I did not see any difference in the results of the comparison of the data.
When looking at the configuration for the memory mapping in the APS6408 from ST below, my understanding is that the memory mapping is using the synchronous read and write.
2024-04-17 10:36 PM
I'm sorry I can't study the circumstances in detail. My understanding is:
Is your enquiry only technical curiosity? If you've observed an errors with memory-mapped mode, you should probably check whether the OCTOSPI's configured to wait long enough for the erase/program to complete.
Not expert. If I've said anything incorrect, please advise. Thanks.
2024-04-17 11:13 PM
The RM says both
I'm describing stuff I'm unfamiliar. To do writes in memory-mapped mode, I expect before changing any data in a page on the APS6408L PSRAM you might:
Wear-levelling and managing preventing losing that page (it's state prior the change) if there's an unexpected power loss during the erase/program are outside the scope of this post.
2024-04-17 11:17 PM
@alister , I am working on a PSRAM, so I believe no erase is necessary here. My initial assumption was that with memory mapped, I would not need to worrry about the Row boundary crossing. However, I am unsure about it.
2024-04-17 11:19 PM
Duh. Of course!
2024-04-17 11:21 PM
As I'd said earlier, neither the CPU nor any STM32U5 bus can perform an access at an address that isn't divisible by its access size. So memory-mapped mode should never care about row-boundary crossings because they can't occur.
2024-04-17 11:23 PM
@alister , When you say access size of bus, do you mean 4 bytes?
2024-04-17 11:30 PM
I mean the access size of the CPU's load/store instruction, e.g. 1, 2, or 4 bytes.
2024-04-18 07:50 AM
@Tesla DeLorean @Ilex , alister and I had some discussion on this topic. Do you have any thoughts on this?