SmartSnippets DA1459x SDK
Macros | Functions

Central include header file with platform definitions. More...

#include <stddef.h>
#include "DA1459x-00.h"
#include "system_DA1459x.h"

Go to the source code of this file.

Macros

#define MTB_MASTER_REG   ((uint32_t *) 0xE0043004)
 MTB-related macros. More...
 
#define MEMORY_REMAPPED_BASE   0x00000000UL
 Remapped device base address.
 
#define MEMORY_REMAPPED_SIZE   (MEMORY_REMAPPED_END - MEMORY_REMAPPED_BASE)
 Remapped device memory size.
 
#define MEMORY_ROM_BASE   0x900000UL
 ROM base address.
 
#define MEMORY_ROM_SIZE   (MEMORY_ROM_END - MEMORY_ROM_BASE)
 ROM memory size.
 
#define MEMORY_SYSRAM_S_BASE   0x20000000UL
 OTP memory base address. More...
 
#define MEMORY_SYSRAM_S_SIZE   (MEMORY_SYSRAM_S_END - MEMORY_SYSRAM_S_BASE)
 SYSTEM RAM size.
 
#define MEMORY_SYSRAM_BASE   0x00800000UL
 SYSTEM RAM (code) base address.
 
#define MEMORY_SYSRAM_SIZE   (MEMORY_SYSRAM_END - MEMORY_SYSRAM_BASE)
 SYSTEM RAM (code) size.
 
#define MEMORY_CACHERAM_BASE   0x36000000UL
 CACHE RAM base address.
 
#define MEMORY_CACHERAM_SIZE   (MEMORY_CACHERAM_END - MEMORY_CACHERAM_BASE)
 CACHE RAM size.
 
#define MEMORY_QSPIF_BASE   (0x16000000UL)
 QSPI Flash base address. More...
 
#define MEMORY_QSPIF_S_BASE   (0x32000000UL)
 
#define MEMORY_QSPIF_SIZE   (MEMORY_QSPIF_END - MEMORY_QSPIF_BASE)
 QSPI Flash memory size.
 
#define MEMORY_EFLASH_BASE   (0xA00000UL)
 
#define MEMORY_EFLASH_S_BASE   (0x31000000UL)
 
#define MEMORY_EFLASH_SIZE   (MEMORY_EFLASH_END - MEMORY_EFLASH_BASE)
 eFlash memory size.
 
#define PRIMARY_PRODUCT_HEADER_BASE   (EFLASH_MEM1_VIRTUAL_BASE_ADDR + 0x1000)
 Primary product header base address.
 
#define BACKUP_PRODUCT_HEADER_BASE   (PRIMARY_PRODUCT_HEADER_BASE + 0x800)
 Backup product header base address.
 
#define MEMORY_EFLASH_USER_DATA_KEYS_BASE   (0x00000800UL)
 TRNG FIFO address. More...
 
#define IS_REMAPPED_ADDRESS(_a)   WITHIN_RANGE((_a), MEMORY_REMAPPED_BASE, MEMORY_REMAPPED_END)
 Address is in the remapped memory region.
 
#define IS_ROM_ADDRESS(_a)   WITHIN_RANGE((_a), MEMORY_ROM_BASE, MEMORY_ROM_END)
 Address is in the ROM region.
 
#define IS_SYSRAM_ADDRESS(_a)   WITHIN_RANGE((_a), MEMORY_SYSRAM_BASE, MEMORY_SYSRAM_END)
 Address is in the OTP memory region. More...
 
#define IS_SYSRAM_S_ADDRESS(_a)   WITHIN_RANGE((_a), MEMORY_SYSRAM_S_BASE, MEMORY_SYSRAM_S_END)
 Address is in the SYSTEM RAM (code) region.
 
#define IS_CACHERAM_ADDRESS(_a)   WITHIN_RANGE((_a), MEMORY_CACHERAM_BASE, MEMORY_CACHERAM_END)
 Address is in the CACHE RAM region.
 
#define IS_QSPIF_ADDRESS(_a)   WITHIN_RANGE((_a), MEMORY_QSPIF_BASE, MEMORY_QSPIF_END)
 Address is in the QSPI Flash memory region.
 
#define IS_QSPIF_S_ADDRESS(_a)   WITHIN_RANGE((_a), MEMORY_QSPIF_S_BASE, MEMORY_QSPIF_S_END)
 Address is in the QSPI AHB-S(ystem) memory region.
 
#define IS_EFLASH_ADDRESS(_a)   WITHIN_RANGE((_a), MEMORY_EFLASH_BASE, MEMORY_EFLASH_END)
 Address is in eFlash memory code region.
 
#define IS_EFLASH_S_ADDRESS(_a)   WITHIN_RANGE((_a), MEMORY_EFLASH_S_BASE, MEMORY_EFLASH_S_END)
 Address is in eFlash memory data region.
 
#define FLASH_SECTOR_SIZE   (0x1000)
 The Sector Size of QSPI flash memories.
 
#define EFLASH_MEM1_VIRTUAL_BASE_ADDR   (0x00000000)
 The Virtual Base Address to access the Embedded Flash memory. More...
 
#define QSPI_MEM1_VIRTUAL_BASE_ADDR
 The Virtual Base Address to access the QSPI Flash memory connected to QSPIC. More...
 
#define __RETAINED   __attribute__((section("retention_mem_zi")))
 Zero-initialized data retained memory attribute.
 
#define __RETAINED_RW   __attribute__((section("retention_mem_init")))
 Initialized data retained memory attribute.
 
#define __RETAINED_UNINIT   __attribute__((section("retention_mem_uninit")))
 Uninitialized data retained memory attribute. Used for variables that should not be initialized during startup.
 
#define __RETAINED_CONST_INIT   __attribute__((section("retention_mem_const")))
 Constant data retained memory attribute.
 
#define __RETAINED_CMI   __RETAINED
 Zero-initialized data retained memory attribute visible by CMAC.
 
#define __RETAIN_CODE_ATTR   __attribute__((section("text_retained"))) __attribute__((noinline)) __attribute__((optimize ("no-tree-switch-conversion")))
 Text retained memory attribute.
 
#define __UNUSED   __attribute__((unused))
 Attribute to silence warnings about unused parameters/variables/function.
 
#define __LTO_EXT   __attribute__((externally_visible))
 Attribute to tell the compiler to consider a symbol as externally visible (for LTO)
 
#define ASSERT_ERROR(a)   ASSERT_WARNING(a)
 Assert as error macro. More...
 
#define GLOBAL_INT_DISABLE()
 Macro to disable all interrupts. More...
 
#define GLOBAL_INT_RESTORE()
 Macro to restore all interrupts. More...
 
#define MIN(a, b)   (((a) < (b)) ? (a) : (b))
 Macro the minimum of two values. More...
 
#define MAX(a, b)   (((a) > (b)) ? (a) : (b))
 Macro the maximum of two values. More...
 
#define SWAP16(a)   __builtin_bswap16(a)
 Macro to swap the bytes of a 16-bit variable. More...
 
#define SWAP32(a)   __builtin_bswap32(a)
 Macro to swap the bytes of a 32-bit variable. More...
 
#define OPT_MEMCPY   __aeabi_memcpy
 Optimized memcpy.
 
#define OPT_MEMMOVE   __aeabi_memmove
 Optimized memmove.
 
#define OPT_MEMSET(s, c, n)   __aeabi_memset(s, n, c)
 Optimized memset.
 
#define REG_MSK(base, reg, field)   (base ## _ ## reg ## _ ## field ## _Msk)
 Access register field mask. More...
 
#define REG_POS(base, reg, field)   (base ## _ ## reg ## _ ## field ## _Pos)
 Access register field position. More...
 
#define REG_GET_FIELD(base, reg, field, var)
 Access register field value. More...
 
#define REG_SET_FIELD(base, reg, field, var, val)
 Set register field value. More...
 
#define RAW_SET_FIELD(mem, mask, val)   mem = ((mem & ~((mask))) | (((val) << (__builtin_ctz(mask))) & (mask)))
 Set memory field value. More...
 
#define REG_CLR_FIELD(base, reg, field, var)   var &= ~(base ## _ ## reg ## _ ## field ## _Msk)
 Clear register field value. More...
 
#define REG_GET_ADDR_INDEXED(base, reg, interval, index)   ((&base->reg) + (((intptr_t) index) * ((interval) / sizeof(base->reg))))
 Get the address of a register value by index (provided a register interval) More...
 
#define REG_GETF_INDEXED(base, reg, field, interval, index)
 Return the value of a register field by index (provided a register interval). More...
 
#define REG_GETF(base, reg, field)   (((base->reg) & (base##_##reg##_##field##_Msk)) >> (base##_##reg##_##field##_Pos))
 Return the value of a register field. More...
 
#define RAW_GETF(addr, mask)   ((*(volatile uint32_t *)(addr) & (mask)) >> (__builtin_ctz(mask)))
 Return the value of a memory field using a mask. More...
 
#define REG_SETF(base, reg, field, new_val)
 Set the value of a register field. More...
 
#define RAW_SETF(addr, mask, val)
 Set the value of a memory field. More...
 
#define REG_SET_BIT(base, reg, field)
 Set a bit of a register. More...
 
#define REG_CLR_BIT(base, reg, field)
 Clear a bit of a register. More...
 
#define REG_SET_MASKED(base, reg, mask, value)
 Sets register bits, indicated by the mask, to a value. More...
 
#define RAW_SET_MASKED(addr, mask, value)
 Sets memory bits, indicated by the mask, to a value. More...
 
#define BITS16(base, reg, field, v)
 Sets 16-bit wide register bits, indicated by the field, to a value v.
 
#define BITS32(base, reg, field, v)
 Sets 32-bit wide register bits, indicated by the field, to a value v.
 
#define GETBITS16(base, reg, v, field)
 Reads 16-bit wide register bits, indicated by the field, to a variable v.
 
#define GETBITS32(base, reg, v, field)
 Reads 32-bit wide register bits, indicated by the field, to a variable v.
 
#define ENABLE_DEBUGGER
 Macro to enable the debugger. More...
 
#define ENABLE_CMAC_DEBUGGER
 Macro to enable the CMAC debugger. More...
 
#define DISABLE_DEBUGGER
 Macro to disable the debugger. More...
 
#define DISABLE_CMAC_DEBUGGER
 Macro to disable the CMAC debugger. More...
 
#define SWRESET
 Macro to cause a software reset. More...
 
#define ARRAY_LENGTH(array)   (sizeof((array))/sizeof((array)[0]))
 Macro to get the number of elements in an array. More...
 
#define NSEC_TO_CLK_CYCLES(nsec, clk_freq_hz)   ((((nsec) * ((clk_freq_hz) / 10000)) + 99999) / 100000)
 Macro to convert time in nsec to clock cycles. More...
 

Functions

void assertion_functions_set_to_uninit (void)
 Assert as warning macro. More...
 

Detailed Description

Central include header file with platform definitions.

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.