RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Macros | Functions

Macros

#define ALT_QSPI_SRAM_FIFO_SIZE   (512)
 
#define ALT_QSPI_SRAM_FIFO_ENTRY_COUNT   (512 / sizeof(uint32_t))
 

Functions

uint32_t alt_qspi_sram_partition_get (void)
 
ALT_STATUS_CODE alt_qspi_sram_partition_set (const uint32_t read_part_size)
 

Detailed Description

The SRAM local memory buffer is a 128 by 32-bit (512 total bytes) memory. The SRAM has two partitions, with the lower partition reserved for indirect read operations and the upper partition for indirect write operations. The size of the partitions is specified in the SRAM partition register, based on 32-bit word sizes. For example, to specify four bytes of storage, write the value 1. The value written to the indirect read partition size field ( addr ) defines the number of entries reserved for indirect read operations. For example, write the value 32 (0x20) to partition the 128-entry SRAM to 32 entries (25%) for read usage and 96 entries (75%) for write usage.

The functions in this section provide accces to configure the SRAM read partition allocation.

Macro Definition Documentation

◆ ALT_QSPI_SRAM_FIFO_SIZE

#define ALT_QSPI_SRAM_FIFO_SIZE   (512)

The size of the onboard SRAM in bytes.

Function Documentation

◆ alt_qspi_sram_partition_get()

uint32_t alt_qspi_sram_partition_get ( void  )

Get the entry count (words) of the indirect read partition in the QSPI controller SRAM.

There is an additional word of read memory not in the SRAM but used to buffer the SRAM and the AHB. As such, the total on board memory buffer for indirect read is 1 more than the value reported by this function.

Returns
The count of 32-bit words of the indirect read partition in the QSPI controller SRAM.

◆ alt_qspi_sram_partition_set()

ALT_STATUS_CODE alt_qspi_sram_partition_set ( const uint32_t  read_part_size)

Set the entry count (words) of the indirect read partition in the QSPI controller SRAM.

Note: It is recommended that setting SRAM partition to 0 or 127 should be avoided although it is not prohibited.

Parameters
read_part_sizeThe count of 32-bit words to allocate to the indirect read partition in the QSPI controller SRAM.
Return values
ALT_E_SUCCESSIndicates successful completion.
ALT_E_ERRORIndicates an error occurred.