Nios® V Processor Software Developer Handbook

ID 743810
Date 10/31/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

3.4.3.3.1. Memory Initialization, Querying, and Device Support

Every flash memory device is queried by the HAL during system initialization to determine the kind of flash memory and the functions to manage it. This process is automatically performed by the alt_sys_init() function, if the device drivers are not explicitly omitted and the small driver configuration is not set.

After initialization, you can query the flash memory for status information with the alt_flash_get_flash_info() function. This function returns a pointer to an array of flash region structures—C structures of type struct flash_region—and the number of regions on the flash device.

For additional information about the struct flash_region structure, refer to the source file HAL/inc/sys/alt_flash_types.h in the BSP project directory.