SmartSnippets DA1459x SDK
Macros

Generic System Configuration Settings. More...

Macros

#define dg_configIMAGE_COPY_TIME   (64)
 Image copy time. More...
 
#define dg_configUSE_WDOG   (0)
 Watchdog Service. More...
 
#define dg_configWDOG_RESET_VALUE   (0xFF)
 Brown-out Detection. More...
 
#define dg_configWDOG_NOTIFY_TRIGGER_TMO   (0)
 Watchdog notify interval. More...
 
#define dg_configABORT_IF_SYSTICK_CLK_ERR   (0)
 Abort a clock modification if it will cause an error to the SysTick counter. More...
 
#define dg_configPM_MAX_ADAPTERS_CNT   (16)
 Maximum adapters count. More...
 
#define dg_configPM_MAX_ADAPTER_DEFER_TIME   (128)
 Maximum sleep defer time. More...
 
#define dg_configUSE_DCDC   (1)
 When set to 1, the DCDC is used. More...
 
#define dg_configUSE_ADC_GAIN_ERROR_CORRECTION   (1)
 Apply ADC Gain Error correction. More...
 
#define dg_configUSE_SYS_TCS   (1)
 Image copy time. More...
 
#define dg_configTESTMODE_MEASURE_SLEEP_CURRENT   (0)
 When set to 1, the system will go to sleep and never exit allowing for the sleep current to be measured. More...
 
#define dg_configRETAIN_HOT_CODE   (0)
 Enable this option in order to retain the hot SDK code to SysRAM. More...
 
#define dg_configWDOG_IDLE_RESET_VALUE   (SYS_WDOG_WATCHDOG_REG_WDOG_VAL_Msk >> SYS_WDOG_WATCHDOG_REG_WDOG_VAL_Pos)
 Reset value for Watchdog when system is idle.
 
#define dg_configWDOG_MAX_TASKS_CNT   (8)
 Maximum watchdog tasks. More...
 
#define dg_configWDOG_GUARD_IDLE_TASK   (1)
 Watchdog guards the idle-task in OS applications. More...
 
#define dg_configREDUCE_RETAINED_CODE   (1)
 System debug logging protection mechanism. More...
 

Detailed Description

Generic System Configuration Settings.

Macro Definition Documentation

◆ dg_configABORT_IF_SYSTICK_CLK_ERR

#define dg_configABORT_IF_SYSTICK_CLK_ERR   (0)

Abort a clock modification if it will cause an error to the SysTick counter.

  • 1: on
  • 0: off
APP EXPERT-only

◆ dg_configIMAGE_COPY_TIME

#define dg_configIMAGE_COPY_TIME   (64)

Image copy time.

The number of LP cycles needed for the application's image data to be copied from the OTP (or QSPI) to the RAM in mirrored mode.

Warning
MUST BE SMALLER THAN dg_configMIN_SLEEP_TIME !!!
APP EXPERT-only

◆ dg_configPM_MAX_ADAPTER_DEFER_TIME

#define dg_configPM_MAX_ADAPTER_DEFER_TIME   (128)

Maximum sleep defer time.

The maximum time sleep can be deferred via a call to pm_defer_sleep_for(). It is in clock cycles in the case of the XTAL32K and in usec in the case of RCX.

Note
It should be > 3.5msec.
APP EXPERT-only

◆ dg_configPM_MAX_ADAPTERS_CNT

#define dg_configPM_MAX_ADAPTERS_CNT   (16)

Maximum adapters count.

Should be equal to the number of Adapters used by the Application. It can be larger (up to 254) than needed, at the expense of increased Retention Memory requirements. It cannot be 0.

APP EXPERT-only

◆ dg_configREDUCE_RETAINED_CODE

#define dg_configREDUCE_RETAINED_CODE   (1)

System debug logging protection mechanism.

   When set to 1, a mutual exclusion mechanism is employed and any ongoing printing activity
   will not be interpolated by another printing attempt that is initiated from another OS task.

   \note The debug logging protection mechanism is not available in Baremetal build configurations

   In particular, the libC standard output functions are overridden in sdk/bsp/startup/config.c by a:
         - custom printf, in case the debug logging string contains:
                -# only characters, e.g. printf("a b c d e f"); or any char-only string prefixed
                   with newline char ("\n"), e.g. printf("\na b c d e f");
                -# any format specifiers (subsequences beginning with %), e.g. printf("a %d c\n",2);
         - custom puts, in case the debug logging string contains one or more newline chars ("\n")
                 in the end but no format specifiers, e.g. printf("\na b c d e f\n"); or printf("f\n");
         - custom putchar, in case the debug logging string is of one only character, even if it is
                 an escaping one, e.g. printf("#"); or printf("\n");

   When set to 0, contenting printing attempts initiated from different contexts may end up in a race
   condition that can result in a disordered and unreadable serial output.

   The debug logging protection mechanism cannot be employed if the console service is enabled.

   \par <tr><th> APP <th>  EXPERT-only

Changes the amount of code in RAM when XIP memory is embedded flash.

When set to 1, the embedded flash (EFLASH) is put to sleep right before the SYS CPU goes to sleep and wakes up when the SYS CPU is awakened. In this mode, the EFLASH remains active while the SYS CPU is awake, and the number of functions that need to be retained in RAM is limited.

When set to 0, the EFLASH is put to sleep when the power manager decides that the SYS CPU can go to sleep and wakes up during the execution of the wake-up sequence. Since the embedded flash is in sleep mode while the SYS CPU is active, more functions need to be retained in SysRAM.

Note
dg_configREDUCE_RETAINED_CODE cannot be set to 1 when code is executed from QSPI.
APP EXPERT-only

◆ dg_configRETAIN_HOT_CODE

#define dg_configRETAIN_HOT_CODE   (0)

Enable this option in order to retain the hot SDK code to SysRAM.

By enabling this setting, all hot SDK code (i.e. the most frequently used SDK functions) is retained to SysRAM. This has a positive impact in terms of power consumption and performance, yet it consumes significantly higher amount of SysRAM.

APP EXPERT-only

◆ dg_configTESTMODE_MEASURE_SLEEP_CURRENT

#define dg_configTESTMODE_MEASURE_SLEEP_CURRENT   (0)

When set to 1, the system will go to sleep and never exit allowing for the sleep current to be measured.

APP EXPERT-only

◆ dg_configUSE_ADC_GAIN_ERROR_CORRECTION

#define dg_configUSE_ADC_GAIN_ERROR_CORRECTION   (1)

Apply ADC Gain Error correction.

  • 1: used
  • 0: not used

The default setting is: 1.

APP EXPERT-only

◆ dg_configUSE_DCDC

#define dg_configUSE_DCDC   (1)

When set to 1, the DCDC is used.

APP EXPERT-only

◆ dg_configUSE_SYS_TCS

#define dg_configUSE_SYS_TCS   (1)

Image copy time.

The number of LP cycles needed for the application's image data to be copied from the OTP (or QSPI) to the RAM in mirrored mode.

Warning
MUST BE SMALLER THAN dg_configMIN_SLEEP_TIME !!!
APP EXPERT-only

◆ dg_configUSE_WDOG

#define dg_configUSE_WDOG   (0)

Watchdog Service.

  • 1: enabled
  • 0: disabled
APP

◆ dg_configWDOG_GUARD_IDLE_TASK

#define dg_configWDOG_GUARD_IDLE_TASK   (1)

Watchdog guards the idle-task in OS applications.

If set to 1, the idle task will register with the Watchdog System Service at system initialization.

APP EXPERT-only

◆ dg_configWDOG_MAX_TASKS_CNT

#define dg_configWDOG_MAX_TASKS_CNT   (8)

Maximum watchdog tasks.

Maximum number of tasks that the Watchdog Service can monitor. It can be larger than needed (up to 32 minus the system-tasks serviced), at the expense of increased Retention Memory requirement.

APP EXPERT-only

◆ dg_configWDOG_NOTIFY_TRIGGER_TMO

#define dg_configWDOG_NOTIFY_TRIGGER_TMO   (0)

Watchdog notify interval.

Interval (in milliseconds) for common timer which can be used to trigger tasks in order to notify watchdog. Can be set to 0 in order to disable timer code entirely.

APP EXPERT-only

◆ dg_configWDOG_RESET_VALUE

#define dg_configWDOG_RESET_VALUE   (0xFF)

Brown-out Detection.

  • 1: used
  • 0: not used
APP

Reset value for Watchdog.

See WATCHDOG_REG:WDOG_VAL field.

APP EXPERT-only