Standard System Initialization - theolind/mahm3lib GitHub Wiki

When the system boots, some things must be initialized. To make a "standard" initialization, this code must be executed before anything else:

/*
* Set Flash Wait State, by defining the number of cycles
* for read and write operations: FWS + 1
*/
eefc_set_flash_wait_state(EEFC0, 4);
eefc_set_flash_wait_state(EEFC1, 4);

// initialize system clock
pmc_init_system_clock();

// disable the watchdog timer
wdt_disable();

Don't forget to include the header files for the API's!

⚠️ **GitHub.com Fallback** ⚠️