Configuration, Software programming model, Hal system library support – Altera Embedded Peripherals IP User Manual
Page 55: Configuration -4, Software programming model -4, Hal system library support -4

Offset
(32-bit Word Address)
Register Name
R/W
Bit Description
31:0
0x100
Read Data
R
0x101
Write Data
W
0x102
Status
R/W
0x103
Control
R/W
0x104
Reserved
—
0x105
Slave Enable
R/W
0x106
End of Packet
R/W
Note: Altera does not publish the usage of the control and data registers. To access the EPCS device, you
must use the HAL drivers provided by Altera.
Configuration
The core must be connected to a Nios II processor. The core provides drivers for HAL-based Nios II
systems, and the precompiled boot loader code compatible with the Nios II processor.
In device families other than Cyclone III and Cyclone IV, you can use the MegaWizard
™
interface to
configure the core to use general I/O pins instead of dedicated pins by turning off both parameters,
Automatically select dedicated active serial interface, if supported and Use dedicated active serial
interface.
Only one EPCS serial flash controller core can be instantiated in each FPGA design.
Software Programming Model
This section describes the software programming model for the EPCS serial flash controller core. Altera
provides HAL system library drivers that enable you to erase and write the EPCS memory using the HAL
API functions. Altera does not publish the usage of the cores registers. Therefore, you must use the HAL
drivers provided by Altera to access the EPCS device.
HAL System Library Support
The Altera-provided driver implements a HAL flash device driver that integrates into the HAL system
library for Nios II systems. Programs call the familiar HAL API functions to program the EPCS memory.
You do not need to know the details of the underlying drivers to use them.
The driver for the EPCS device is excluded when the reduced device drivers option is enabled in a BSP or
system library. To force inclusion of the EPCS drivers in a BSP with the reduced device drivers option
enabled, you can define the preprocessor symbol,
ALT_USE_EPCS_FLASH
, before including the header, as
follows:
#define ALT_USE_EPCS_FLASH
#include
6-4
Configuration
UG-01085
2014.24.07
Altera Corporation
EPCS Serial Flash Controller Core