80#include <avr/interrupt.h>
117 .WDTCFG = WINDOW_OFF_gc | PERIOD_OFF_gc,
118 .BODCFG = LVL_BODLEVEL1_gc | SAMPFREQ_128HZ_gc | ACTIVE_ENABLE_gc | SLEEP_ENABLE_gc,
119 .SYSCFG0 = FUSE_SYSCFG0_DEFAULT,
120 .SYSCFG1 = WDTMON_ON_gc | MVSYSCFG_DUAL_gc | SUT_0MS_gc,
121 .CODESIZE = FUSE_CODESIZE_DEFAULT,
122 .BOOTSIZE = FUSE_BOOTSIZE_DEFAULT,
123 .PDICFG = FUSE_PDICFG_DEFAULT,
288ISR(NVMCTRL_ERROR_vect)
Defines for placing functions in specific memory sections.
#define INIT3_SECTION
Defines compiler-specific attributes for placing a function in the .init3 memory section.
void TM_InterruptsBod(void)
Executes the task responsible for handling a Brown-out Detector (BOD) interrupt.
void TM_InterruptsPower(void)
Executes the task responsible for handling a Sleep Controller (SLPCTRL) interrupt.
void TM_InterruptsSwdt(void)
Executes the task responsible for handling a Synchronous Watchdog Timer (SWDT) interrupt.
void TM_InterruptsNvm(void)
Executes the task responsible for handling a NVM Controller (NVMCTRL) error interrupt.
void TM_InterruptsClock(void)
Executes the task responsible for handling a Clock Controller (CLKCTRL) interrupt.
void TM_InterruptsDefault(void)
Executes the default task responsible for handling accidental (bad) interrupts.
void TM_InterruptsCrc(void)
Executes the task responsible for handling a CRC Scan (CRCSCAN) interrupt.
void TM_InterruptsRam(void)
Executes the task responsible for handling a RAM Controller (RAMCTRL) error interrupt.
void TM_InterruptsErrorCh(void)
Executes the task responsible for handling a Error Controller (ERRCTRL) channel interrupt.
void TM_InterruptsNmi(void)
Executes the task responsible for handling a Non-maskable Interrupt (NMI).
bool suspendScheduler
Defines an example boolean for the Application to optionally start the Shutdown sequence.
#define DUR_UNTIL_NEXT_SCHEDULE
Configures the duration in system clock cycles until the first Task in the next example Application s...
static const scheduleEntry_t appSchedule[SCHEDULE_LEN]
Defines an example Application Schedule with optional Tasks.
int main(void)
Runs the Startup, Scheduler and optionally Shutdown Task Managers.
FUSES
Sets a Framework compatible User Fuses configuration.
static const scheduleEntry_t appStartupSchedule[STARTUP_SCHEDULE_LEN]
Defines an example Application Startup Schedule with optional Tasks.
static const scheduleEntry_t appShutdownTask
Defines an example Application Shutdown Task schedule entry.
static void INIT3_SECTION PreMain(void)
Runs the Pre-startup Task Manager before entering Main.
LOCKBITS
Sets a Memory Sections Access Protection (Lock) Configuration.
#define SCHEDULE_LEN
Configures the schedule length of the example Application Schedule.
#define STARTUP_SCHEDULE_LEN
Configures the schedule length of the example Application Startup Schedule.
void TM_PreStartup(void)
Manages safety system Pre-startup Tasks.
void TM_Scheduler(const scheduleEntry_t schedule[], uint8_t scheduleLength, uint32_t nextScheduleDeadline)
Manages and synchronizes safety system and application Tasks from a user defined schedule.
void TM_Shutdown(const scheduleEntry_t appShutdownTask)
Manages Tasks that ensure safe execution of device sleeping in Standby and Power-Down.
void TM_Startup(const scheduleEntry_t appStartupSchedule[], uint8_t scheduleLength)
Manages and synchronizes safety system and application startup Tasks.
Defines configurations used in main_example.c.