Forum Discussion
Questions About GSFI, QSPI Flash XIP Boot, and HAL API Support
Hi watanabe
Based on your explanation, you are designing a:
- Max 10 RSU + Nios V design
- Nios V is booted from N25Q512A83GSF40F
- Nios V use HAL API to access the same N25Q512A83GSF40F
watanabe wrote:1. Is it possible to use both XIP boot from QSPI Flash and dual configuration simultaneously?
The Max 10 configuration CFM & general purpose N25Q512A83GSF40F are two separate memories. For now (please continue reading below), XIP boot will not conflict with Max 10 RSU.
watanabe wrote:4. Alternative method if HAL API is not available
The act of accessing flash is not possible with XIP boot. XIP boot fully owns the N25Q512A83GSF40F, other flash access cannot take place.
Imagine that there are two functions in the Nios V application, (1) XIP booting & (2) Customer's Read/Write operations - (1) will never release the N25Q512A83GSF40F for (2).
You need to switch to the (3) Bootloader via GSFI approach - (3) will release the N25Q512A83GSF40F after bootcopy completes, so that (2) can begin.
After switching to Bootloader via GSFI with dual configuration,
watanabe wrote:2. Regarding the GSFI HAL API support
4. Alternative method if HAL API is not available
Correct, there is no GSFI HAL API in Quartus Standard and Lite.
As an alternative, you can pick one of the alternative below:
- Create custom API based on this System Console example with IOWR / IORD.
- Copy the GSFI HAL API from Quartus Pro, paste it in the Max 10 project & improvise the BSP CMakeLists.txt (Similar reference with Mailbox Client IP HAL API)
C:\altera_pro\26.1.1\ip\altera\eip\intel_generic_serial_flash_interface\intel_generic_serial_flash_interface_top\HAL\inc\intel_generic_serial_flash_interface_top.h
C:\altera_pro\26.1.1\ip\altera\eip\intel_generic_serial_flash_interface\intel_generic_serial_flash_interface_top\HAL\src\intel_generic_serial_flash_interface_top.c
C:\altera_pro\26.1.1\ip\altera\eip\intel_generic_serial_flash_interface\intel_generic_serial_flash_interface_top\inc\intel_generic_serial_flash_interface_top_regs.hSince both are creating API from scratch, remember to test the API extensively.
Nirav_Altera wrote:3. N25Q512A83GSF40F support in the HAL API
If you are going with custom API, this concern is not applicable. You are going design the custom API with N25Q512A83GSF40F in mind yourselves.
If you are going with "copy & paste HAL API", this concern is applicable. Use the HAL API source code as references, and review the flash-specific "#define" or flash's programming model.
Regards,
Liang Yu