RTEMS: Direct Access Mode

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Functions
Direct Access Mode
Board Support Packages » ARM » Intel Cyclone V » Contributed Code » QSPI Flash Controller Module

## Functions
ALT_STATUS_CODE | alt_qspi_direct_disable (void)
ALT_STATUS_CODE | alt_qspi_direct_enable (void)
uint32_t | alt_qspi_ahb_remap_address_get (void)
ALT_STATUS_CODE | alt_qspi_ahb_remap_address_set (const uint32_t ahb_remap_addr)
ALT_STATUS_CODE | alt_qspi_ahb_address_remap_disable (void)
ALT_STATUS_CODE | alt_qspi_ahb_address_remap_enable (void)

## Detailed Description

In direct access mode, an access to the AHB data slave triggers a read or write command to the flash memory. To use the direct access mode, enable the direct access controller with the alt_qspi_direct_enable() function. An external master, for example a processor, triggers the direct access controller with a read or write operation to the AHB data slave interface. The data slave exposes a 1MB window into the flash device. You can remap this window to any 1MB location within the flash device address range.

To remap the AHB data slave to access other 1MB regions of the flash device, enable address remapping by calling alt_qspi_ahb_address_remap_enable(). All incoming data slave accesses remap to the offset specified in the remap address register which is configured by alt_qspi_ahb_remap_address_set().

The 20 LSBs of incoming addresses are used for accessing the 1MB region and the higher bits are ignored.

The quad SPI controller does not issue any error status for accesses that lie outside the connected flash memory space.

## Function Documentation

## ◆ alt_qspi_ahb_address_remap_disable()

ALT_STATUS_CODE alt_qspi_ahb_address_remap_disable | ( | void |  | ) |

Disable AHB address remapping.

Disables remapping of incoming AHB addresses so they are sent unmodified to the flash device. The incoming AHB address maps directly to the address serially sent to the flash device.

Return values

  ALT_E_SUCCESS | Indicates successful completion.
  ALT_E_ERROR | Indicates an error occurred.

## ◆ alt_qspi_ahb_address_remap_enable()

ALT_STATUS_CODE alt_qspi_ahb_address_remap_enable | ( | void |  | ) |

Enable AHB address remapping.

Enables remapping of incoming AHB addresses so they are modified to <address> + N, where N is the configured remap address value.

See: alt_qspi_ahb_remap_address_set().

Return values

  ALT_E_SUCCESS | Indicates successful completion.
  ALT_E_ERROR | Indicates an error occurred.

## ◆ alt_qspi_ahb_remap_address_get()

uint32_t alt_qspi_ahb_remap_address_get | ( | void |  | ) |

Get the current AHB address remap value.

Returns the current value of the AHB remap address register.

Returns
  The value used to remap an incoming AHB address to a different address used by the flash device.

## ◆ alt_qspi_ahb_remap_address_set()

ALT_STATUS_CODE alt_qspi_ahb_remap_address_set | ( | const uint32_t | ahb_remap_addr | ) |

Set the AHB address remap value.

Sets the value of the AHB remap address register.

This API requires that the QSPI controller be idle, as determined by alt_qspi_is_idle().

Parameters

  ahb_remap_addr | The value used to remap an incoming AHB address to a different address used by the flash device.

Return values

  ALT_E_SUCCESS | Indicates successful completion.
  ALT_E_ERROR | Indicates an error occurred.

## ◆ alt_qspi_direct_disable()

ALT_STATUS_CODE alt_qspi_direct_disable | ( | void |  | ) |

Disable the QSPI Direct Access Controller.

Return values

  ALT_E_SUCCESS | Indicates successful completion.
  ALT_E_ERROR | Indicates an error occurred.

## ◆ alt_qspi_direct_enable()

ALT_STATUS_CODE alt_qspi_direct_enable | ( | void |  | ) |

Enable the QSPI Direct Access Controller.

Return values

  ALT_E_SUCCESS | Indicates successful completion.
  ALT_E_ERROR | Indicates an error occurred.