Skip to content

Commit 8675d73

Browse files
Alain Volmatkartben
authored andcommitted
boards: st: n6: avoid access to last 32B of memory-mapped XSPI device
System might become unstable when the last 32 bytes of a XSPI attached are accessed in memory-mapped mode with cache enabled. In order to prevent this, remove the last 32-bytes of the PSRAM on the stm32n6570_dk as well as NOR on the nucleo n657x0_q. Partitions should also be defined in a way to avoid accessing to the last 32-bytes of the device. Issue is described in the STM32N6xxxx errata sheet ES0620 Rev 1: 2.4.5 Deadlock or data corruption when DQS is enabled and the wrap request includes the last address of the memory Signed-off-by: Alain Volmat <[email protected]>
1 parent eba8f3a commit 8675d73

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

boards/st/nucleo_n657x0_q/nucleo_n657x0_q_common.dtsi

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,13 @@ zephyr_udc0: &usbotg_hs1 {
246246

247247
storage_partition: partition@3ff0000 {
248248
label = "storage";
249-
reg = <0x3ff0000 DT_SIZE_K(64)>;
249+
/*
250+
* Prevent access to the last 32bytes of the memory-mapped device
251+
* Issue described in the STM32N6xxxx errata sheet ES0620 Rev 1:
252+
* 2.4.5 Deadlock or data corruption when DQS is enabled and the
253+
* wrap request includes the last address of the memory
254+
*/
255+
reg = <0x3ff0000 (DT_SIZE_K(64) - 32)>;
250256
};
251257
};
252258
};

boards/st/stm32n6570_dk/stm32n6570_dk_common.dtsi

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@
4141

4242
psram: memory@90000000 {
4343
compatible = "zephyr,memory-region";
44-
reg = <0x90000000 DT_SIZE_M(32)>;
44+
/*
45+
* Prevent access to the last 32bytes of the memory-mapped device
46+
* Issue described in the STM32N6xxxx errata sheet ES0620 Rev 1:
47+
* 2.4.5 Deadlock or data corruption when DQS is enabled and the
48+
* wrap request includes the last address of the memory
49+
*/
50+
reg = <0x90000000 (DT_SIZE_M(32) - 32)>;
4551
zephyr,memory-region = "PSRAM";
4652
zephyr,memory-attr = <DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE)>;
4753
};

0 commit comments

Comments
 (0)