SmartSnippets DA1459x SDK
Macros | Functions
ad_flash.h File Reference

Flash adapter API. More...

#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include "qspi_automode.h"
#include "eflash_automode.h"

Go to the source code of this file.

Macros

#define AD_FLASH_ALWAYS_FLUSH_CACHE   ((uint32_t) - 1)
 Special base address used to return to the default cache flushing mode. More...
 

Functions

void ad_flash_init (void)
 Initialize the flash adapter. More...
 
size_t ad_flash_read (uint32_t addr, uint8_t *buf, size_t len)
 Read data from flash memory. More...
 
size_t ad_flash_write (uint32_t addr, const uint8_t *buf, size_t size)
 Write data to flash memory. More...
 
bool ad_flash_erase_region (uint32_t addr, size_t size)
 Erase a flash memory region. More...
 
const __STATIC_INLINE void * ad_flash_get_ptr (uint32_t addr)
 Translate a virtual address to a pointer that directly accesses the corresponding physical flash memory location. More...
 
int ad_flash_update_possible (uint32_t addr, const uint8_t *data_to_write, size_t size)
 Check if a flash update can be performed without erasing memory. More...
 
size_t ad_flash_erase_size (uint32_t addr)
 Get minimum flash erasable size (sector size) More...
 
bool ad_flash_chip_erase_by_addr (uint32_t addr)
 Perform full erase of a specified flash memory. More...
 
void ad_flash_lock (void)
 Lock the flash adapter to prevent multiple tasks from accessing the same flash memory simultaneously. More...
 
void ad_flash_unlock (void)
 Release lock on flash adapter. More...
 
void ad_flash_skip_cache_flushing (uint32_t base, uint32_t size)
 Control cache flushing on modifications to a specified flash region. More...
 

Detailed Description

Flash adapter API.

Copyright (C) 2015-2023 Renesas Electronics Corporation and/or its affiliates. All rights reserved. Confidential Information.

This software ("Software") is supplied by Renesas Electronics Corporation and/or its affiliates ("Renesas"). Renesas grants you a personal, non-exclusive, non-transferable, revocable, non-sub-licensable right and license to use the Software, solely if used in or together with Renesas products. You may make copies of this Software, provided this copyright notice and disclaimer ("Notice") is included in all such copies. Renesas reserves the right to change or discontinue the Software at any time without notice.

THE SOFTWARE IS PROVIDED "AS IS". RENESAS DISCLAIMS ALL WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. TO THE MAXIMUM EXTENT PERMITTED UNDER LAW, IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE, EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. USE OF THIS SOFTWARE MAY BE SUBJECT TO TERMS AND CONDITIONS CONTAINED IN AN ADDITIONAL AGREEMENT BETWEEN YOU AND RENESAS. IN CASE OF CONFLICT BETWEEN THE TERMS OF THIS NOTICE AND ANY SUCH ADDITIONAL LICENSE AGREEMENT, THE TERMS OF THE AGREEMENT SHALL TAKE PRECEDENCE. BY CONTINUING TO USE THIS SOFTWARE, YOU AGREE TO THE TERMS OF THIS NOTICE.IF YOU DO NOT AGREE TO THESE TERMS, YOU ARE NOT PERMITTED TO USE THIS SOFTWARE.