How to use a XSPI NOR memory in memory-mapped mode with IS25LXWX01G.
This example describes how to erase a part of an XSPI NOR memory, write data in indirect mode and access to XSPI NOR memory in memory-mapped mode to check the data in an infinite loop. The memory is configured in octal DTR mode. This example shows the code discussed in the article, how to port an STM32N6 XSPI memory-mapped DTR example from MX66UW1G45G to IS25LXWX01G.
- This project is designed to run on the STM32N657X0H3QU microcontroller, utilizing the STM32N6570-DK development board from STMicroelectronics. The default NOR memory has been replaced with the IS25LXWX01G device.
- The FSBL project configures the maximum system clock frequency at 600 MHz.
LED_GREEN toggles each time a new comparison is good.
LED_RED is ON as soon as a comparison error occurs.
LED_RED toggles as soon as an error is returned by HAL API.
-
Care must be taken when using HAL_Delay(), this function provides accurate delay (in milliseconds) based on variable incremented in SysTick ISR. This implies that if HAL_Delay() is called from a peripheral ISR process, then the SysTick interrupt must have higher priority (numerically lower) than the peripheral interrupt. Otherwise the caller ISR process will be blocked. To change the SysTick interrupt priority you have to use HAL_NVIC_SetPriority() function.
-
The application needs to ensure that the SysTick time base is always set to 1 millisecond to have correct HAL operation.
Memory, XSPI, Read, Write, Memory Mapped, NOR, DTR Mode
- XSPI/XSPI_NOR_MemoryMapped_DTR/FSBL/Inc/stm32n6xx_hal_conf.h HAL configuration file
- XSPI/XSPI_NOR_MemoryMapped_DTR/FSBL/Inc/stm32n6xx_it.h Interrupt handlers header file
- XSPI/XSPI_NOR_MemoryMapped_DTR/FSBL/Inc/main.h Header for main.c module
- XSPI/XSPI_NOR_MemoryMapped_DTR/FSBL/Src/stm32n6xx_it.c Interrupt handlers
- XSPI/XSPI_NOR_MemoryMapped_DTR/FSBL/Src/main.c Main program
- XSPI/XSPI_NOR_MemoryMapped_DTR/FSBL/Src/stm32n6xx_hal_msp.c HAL MSP module
- XSPI/XSPI_NOR_MemoryMapped_DTR/FSBL/Src/system_stm32n6xx.c STM32N6xx system source file
-
This example has been tested with STMicroelectronics STM32N6570-DK (MB1939) board and can be easily tailored to any other supported device and development board.
-
On STM32N6570-DK board, the BOOT1 mechanical slide switch must be set to SW1.
-
EWARM : To monitor a variable in the live watch window, you must proceed as follow :
- Start a debugging session.
- Open the View > Images.
- Double-click to deselect the second instance of project.out.
- Set the boot mode in development mode (BOOT1 switch position is 1-3, BOOT0 switch position doesn't matter).
- Open your preferred toolchain
- Rebuild all files and load your image into target memory. Code can be executed in this mode for debugging purposes.
Warning If using CubeProgrammer v2.21 version or more recent, add -align option in the command line.