Skip to content

Commit

Permalink
Add FUSES configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiancristea00 committed Dec 19, 2023
1 parent 081df54 commit 92a4f82
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,34 @@ INLINE void PrintForLogging(char const * const message)

return;
}


////////////////////////////////////////////////////////////////////////////////
// //
// Fuses //
// //
////////////////////////////////////////////////////////////////////////////////

#if defined __AVR128DA48__
FUSES = {
.BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,
.BOOTSIZE = 0x00,
.CODESIZE = 0x00,
.OSCCFG = CLKSEL_OSCHF_gc,
.SYSCFG0 = CRCSEL_CRC16_gc | CRCSRC_NOCRC_gc | RSTPINCFG_GPIO_gc,
.SYSCFG1 = SUT_0MS_gc,
.WDTCFG = PERIOD_OFF_gc | WINDOW_OFF_gc,
};
#elif defined __AVR64DD32__
FUSES = {
.BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,
.BOOTSIZE = 0x00,
.CODESIZE = 0x00,
.OSCCFG = CLKSEL_OSCHF_gc,
.SYSCFG0 = CRCSEL_CRC16_gc | CRCSRC_NOCRC_gc | RSTPINCFG_GPIO_gc | UPDIPINCFG_UPDI_gc,
.SYSCFG1 = MVSYSCFG_DUAL_gc | SUT_0MS_gc,
.WDTCFG = PERIOD_OFF_gc | WINDOW_OFF_gc,
};
#else
#error "Invalid device!"
#endif

0 comments on commit 92a4f82

Please sign in to comment.