diff --git a/arch/arm/SAME54/SAME54A/modules/core/clocks/cfg/conf_clocks.h b/arch/arm/SAME54/SAME54A/modules/core/clocks/cfg/conf_clocks.h new file mode 100644 index 00000000..c00e2c22 --- /dev/null +++ b/arch/arm/SAME54/SAME54A/modules/core/clocks/cfg/conf_clocks.h @@ -0,0 +1,17 @@ +#ifndef __CONF_CLOCKS_H__ +#define __CONF_CLOCKS_H__ + +#define CONF_XOSC32K_ENABLE 1 +#define CONF_OSCULP32K_ENABLE 1 +#define CONF_XOSC0_ENABLE 1 +#define CONF_XOSC1_ENABLE 1 +#define CONF_PORT_EVCTRL_ENABLE 0 + +#define CONF_DMAC_ENABLE 1 + +#define CONF_CMCC_ENABLE 1 +#define CONF_CMCC_DATA_CACHE_DISABLE 0 +#define CONF_CMCC_INST_CACHE_DISABLE 0 +#define CONF_CMCC_CLK_GATING_DISABLE 0 + +#endif diff --git a/arch/arm/SAME54/SAME54A/modules/core/clocks/clocks.edm b/arch/arm/SAME54/SAME54A/modules/core/clocks/clocks.edm new file mode 100644 index 00000000..e69de29b diff --git a/arch/arm/SAME54/SAME54A/modules/core/clocks/inc/clocks.h b/arch/arm/SAME54/SAME54A/modules/core/clocks/inc/clocks.h new file mode 100644 index 00000000..8c65f248 --- /dev/null +++ b/arch/arm/SAME54/SAME54A/modules/core/clocks/inc/clocks.h @@ -0,0 +1,9 @@ +#ifndef __CLOCKS_H__ +#define __CLOCKS_H__ + +#include "conf_clocks.h" + +void clocks_init(void); + +#endif + diff --git a/arch/arm/SAME54/SAME54A/modules/core/clocks/src/clocks.c b/arch/arm/SAME54/SAME54A/modules/core/clocks/src/clocks.c new file mode 100644 index 00000000..a1560e7d --- /dev/null +++ b/arch/arm/SAME54/SAME54A/modules/core/clocks/src/clocks.c @@ -0,0 +1,36 @@ +#include "clocks.h" + +static void xosc32k_init(void); +static void osculp32k_init(void); + +void clocks_init() +{ + + + #if CONF_XOSC32K_ENABLE == 1 + xosc32k_init(); + #endif + + #if CONF_OSCULP32K_ENABLE == 1 + osculp32k_init(); + #endif + + // wait xosc32k ready bit + + #if CONF_XOSC0_ENABLE == 1 + + #endif + + #if CONF_XOSC1_ENABLE == 1 + + #endif + + // master clk init + + #if (CONF_PORT_EVCTRL_ENABLE != 0) + #if CONF_CMCC_ENABLE + + #endif + + +} diff --git a/arch/arm/SAME54/SAME54A/modules/same54a.emm b/arch/arm/SAME54/SAME54A/modules/same54a.emm new file mode 100644 index 00000000..07e89c4d --- /dev/null +++ b/arch/arm/SAME54/SAME54A/modules/same54a.emm @@ -0,0 +1,29 @@ +# core modules are required modules +# drivers are optional but are used often +# libraries are optional and opinionated +# libs speed up development but are not necessary by any means +# +# module = +# [ +# "interactive_name", +# [ +# "dependency_1", +# "dependency_2" +# ], +# +# ] +# +# +# +# +# +# +# + +[core] +clocks = "core/clocks/clocks.edm" +power_manager = "core/pm/pm.edm" + +[drivers] +usart_sync = "usart/usart_sync/usart_sync.edm" +