SmartSnippets DA1459x SDK
Files | Data Structures | Functions

Configuration values for the various supported qspi devices. More...

Files

file  eflash_automode.h
 Access EFLASH device when running in auto mode.
 
file  qspi_automode.h
 Access QSPI device when running in auto mode.
 
file  qspi_automode_v2.h
 QSPI Memory Abstraction Interface.
 
file  qspi_common_v2.h
 QSPI flash driver common definitions.
 
file  qspi_macronix_v2.h
 The macros and functions of this header file are utilized by the memory drivers of the Macronix QSPI flash memories.
 
file  qspi_mx25u3235_v2.h
 QSPI flash driver for Macronix MX25U3235_V2.
 
file  qspi_w25q32jwim_v2.h
 QSPI flash driver for Winbond W25Q32JWIM_V2.
 
file  qspi_w25q32jwiq_v2.h
 QSPI flash driver for Winbond W25Q32JWIQ_V2.
 
file  qspi_winbond_v2.h
 The macros and functions of this header file are utilized by the memory drivers of the Winbond QSPI flash memories.
 

Data Structures

struct  jedec_id_t
 JEDEC ID struct. More...
 
struct  qspi_callback_t
 QSPI memory callbacks struct. More...
 
struct  qspi_delay_t
 QSPI memory delays. More...
 
struct  qspi_flash_config_t
 QSPI memory configuration structure. More...
 

Functions

const __RETAINED_CODE void * eflash_automode_get_physical_addr (uint32_t virtual_addr)
 Get the physical address of eFlash memory for the given virtual address. More...
 
__RETAINED_CODE bool eflash_automode_is_valid_virtual_address_range (uint32_t addr, uint32_t len)
 Check if the virtual address range from addr to addr + len is valid. More...
 
__RETAINED_CODE bool eflash_automode_is_valid_virtual_addr (uint32_t addr)
 Verify if given virtual address points to EFLASH memory. More...
 
__ALWAYS_RETAINED_CODE void eflash_automode_wakeup (void)
 Wakeup EFLASH. More...
 
__ALWAYS_RETAINED_CODE void eflash_automode_sleep (void)
 Sef EFLASH to sleep mode. More...
 
uint32_t eflash_automode_read (uint32_t addr, uint8_t *buf, uint32_t len)
 Read data from EFLASH memory. More...
 
__ALWAYS_RETAINED_CODE uint32_t eflash_automode_write_page (uint32_t addr, const uint8_t *buf, uint32_t len)
 Write data to EFLASH memory page. More...
 
__ALWAYS_RETAINED_CODE bool eflash_automode_erase_sector (uint32_t addr)
 Erase EFLASH sector. More...
 
__RETAINED_CODE bool eflash_automode_erase_chip (void)
 Erase chip. More...
 

Detailed Description

Configuration values for the various supported qspi devices.

Function Documentation

◆ eflash_automode_erase_chip()

__RETAINED_CODE bool eflash_automode_erase_chip ( void  )

Erase chip.

Returns
true if chip was erased successfully, false otherwise
Note
If info page protection is enabled, it won't be erased.
See also
eflash_automode_wakeup() eflash_automode_sleep()

◆ eflash_automode_erase_sector()

__ALWAYS_RETAINED_CODE bool eflash_automode_erase_sector ( uint32_t  addr)

Erase EFLASH sector.

Erase EFLASH sector. Note that size of EFLASH sector is 0x800 bytes.

Parameters
[in]addrsector address
Returns
true if sector was erased successfully, false otherwise
See also
eflash_automode_wakeup() eflash_automode_sleep()

◆ eflash_automode_get_physical_addr()

const __RETAINED_CODE void* eflash_automode_get_physical_addr ( uint32_t  virtual_addr)

Get the physical address of eFlash memory for the given virtual address.

Parameters
[in]virtual_addrVirtual address
Warning
Use eflash_automode_is_valid_virtual_addr() to check whether the given virtual address is within the acceptable eFlash virtual address space area. If an invalid virtual address is passed to this function, the returned physical address will be invalid as well. The function doesn't check against invalid input.
Returns
Physical address in CPU address space where data is located

◆ eflash_automode_is_valid_virtual_addr()

__RETAINED_CODE bool eflash_automode_is_valid_virtual_addr ( uint32_t  addr)

Verify if given virtual address points to EFLASH memory.

Parameters
[in]addrVirtual address.
Returns
true if virtual address points to EFLASH memory range, false otherwise

◆ eflash_automode_is_valid_virtual_address_range()

__RETAINED_CODE bool eflash_automode_is_valid_virtual_address_range ( uint32_t  addr,
uint32_t  len 
)

Check if the virtual address range from addr to addr + len is valid.

Warning
This function requires virtual destination address. Do not provide physical or zero-based address.
Parameters
[in]addrVirtual start address to be checked.
[in]lenLength of bytes to access relative to the virtual start address, which determines the virtual end address to be checked.
Returns
True, if the input address virtual range is valid, otherwise false.

◆ eflash_automode_read()

uint32_t eflash_automode_read ( uint32_t  addr,
uint8_t *  buf,
uint32_t  len 
)

Read data from EFLASH memory.

Parameters
[in]addraddress pointing to EFLASH memory
[in]bufbuffer to read data to
[in]lennumber of bytes to read
Returns
number of bytes read
See also
eflash_automode_wakeup() eflash_automode_sleep()

◆ eflash_automode_sleep()

__ALWAYS_RETAINED_CODE void eflash_automode_sleep ( void  )

Sef EFLASH to sleep mode.

This function put EFLASH into sleep mode.

◆ eflash_automode_wakeup()

__ALWAYS_RETAINED_CODE void eflash_automode_wakeup ( void  )

◆ eflash_automode_write_page()

__ALWAYS_RETAINED_CODE uint32_t eflash_automode_write_page ( uint32_t  addr,
const uint8_t *  buf,
uint32_t  len 
)

Write data to EFLASH memory page.

This function writes data do EFLASH memory. Note that EFLASH hardware supports writes of 32 bit words only, and if buffer or address is not word-aligned, flash content will be read, overwritten and written back to flash. Therefore word-aligned memory area should be erased before. Note that page boundary cannot be crossed and, as a result up to page size may be written.

Parameters
[in]addraddress pointing to EFLASH memory
[in]bufbuffer to write data into
[in]lennumber of bytes to write
Returns
number of written bytes
See also
eflash_automode_wakeup() eflash_automode_sleep()