hpl_pmc_config.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053
  1. /* Auto-generated config file hpl_pmc_config.h */
  2. #ifndef HPL_PMC_CONFIG_H
  3. #define HPL_PMC_CONFIG_H
  4. // <<< Use Configuration Wizard in Context Menu >>>
  5. #include <peripheral_clk_config.h>
  6. #define CLK_SRC_OPTION_OSC32K 0
  7. #define CLK_SRC_OPTION_XOSC32K 1
  8. #define CLK_SRC_OPTION_OSC12M 2
  9. #define CLK_SRC_OPTION_XOSC20M 3
  10. #define CLK_SRC_OPTION_SLCK 0
  11. #define CLK_SRC_OPTION_MAINCK 1
  12. #define CLK_SRC_OPTION_PLLACK 2
  13. #define CLK_SRC_OPTION_UPLLCKDIV 3
  14. #define CLK_SRC_OPTION_MCK 4
  15. #define CLK_SRC_OPTION_UPLLCK 3
  16. #define CONF_RC_4M 0
  17. #define CONF_RC_8M 1
  18. #define CONF_RC_12M 2
  19. #define CONF_XOSC32K_NO_BYPASS 0
  20. #define CONF_XOSC32K_BYPASS 1
  21. #define CONF_XOSC20M_NO_BYPASS 0
  22. #define CONF_XOSC20M_BYPASS 1
  23. // <e> Clock_SLCK configuration
  24. // <i> Indicates whether SLCK configuration is enabled or not
  25. // <id> enable_clk_gen_slck
  26. #ifndef CONF_CLK_SLCK_CONFIG
  27. #define CONF_CLK_SLCK_CONFIG 1
  28. #endif
  29. //<h> Clock Generator
  30. // <y> clock generator SLCK source
  31. // <CLK_SRC_OPTION_OSC32K"> 32kHz High Accuracy Internal Oscillator (OSC32K)
  32. // <CLK_SRC_OPTION_XOSC32K"> 32kHz External Crystal Oscillator (XOSC32K)
  33. // <i> This defines the clock source for SLCK
  34. // <id> clk_gen_slck_oscillator
  35. #ifndef CONF_CLK_GEN_SLCK_SRC
  36. #define CONF_CLK_GEN_SLCK_SRC CLK_SRC_OPTION_OSC32K
  37. #endif
  38. // <q> Enable Clock_SLCK
  39. // <i> Indicates whether SLCK is enabled or disable
  40. // <id> clk_gen_slck_arch_enable
  41. #ifndef CONF_CLK_SLCK_ENABLE
  42. #define CONF_CLK_SLCK_ENABLE 1
  43. #endif
  44. // </h>
  45. // <h>
  46. // </h>
  47. // </e>// <e> Clock_MAINCK configuration
  48. // <i> Indicates whether MAINCK configuration is enabled or not
  49. // <id> enable_clk_gen_mainck
  50. #ifndef CONF_CLK_MAINCK_CONFIG
  51. #define CONF_CLK_MAINCK_CONFIG 1
  52. #endif
  53. //<h> Clock Generator
  54. // <y> clock generator MAINCK source
  55. // <CLK_SRC_OPTION_OSC12M"> Embedded 4/8/12MHz RC Oscillator (OSC12M)
  56. // <CLK_SRC_OPTION_XOSC20M"> External 3-20MHz Oscillator (XOSC20M)
  57. // <i> This defines the clock source for MAINCK
  58. // <id> clk_gen_mainck_oscillator
  59. #ifndef CONF_CLK_GEN_MAINCK_SRC
  60. #define CONF_CLK_GEN_MAINCK_SRC CLK_SRC_OPTION_XOSC20M
  61. #endif
  62. // <q> Enable Clock_MAINCK
  63. // <i> Indicates whether MAINCK is enabled or disable
  64. // <id> clk_gen_mainck_arch_enable
  65. #ifndef CONF_CLK_MAINCK_ENABLE
  66. #define CONF_CLK_MAINCK_ENABLE 1
  67. #endif
  68. // <q> Enable Main Clock Failure Detection
  69. // <i> Indicates whether Main Clock Failure Detection is enabled or disable.
  70. // <i> The 4/8/12 MHz RC oscillator must be selected as the source of MAINCK.
  71. // <id> clk_gen_cfden_enable
  72. #ifndef CONF_CLK_CFDEN_ENABLE
  73. #define CONF_CLK_CFDEN_ENABLE 0
  74. #endif
  75. // </h>
  76. // <h>
  77. // </h>
  78. // </e>// <e> Clock_MCKR configuration
  79. // <i> Indicates whether MCKR configuration is enabled or not
  80. // <id> enable_clk_gen_mckr
  81. #ifndef CONF_CLK_MCKR_CONFIG
  82. #define CONF_CLK_MCKR_CONFIG 1
  83. #endif
  84. //<h> Clock Generator
  85. // <y> clock generator MCKR source
  86. // <CLK_SRC_OPTION_SLCK"> Slow Clock (SLCK)
  87. // <CLK_SRC_OPTION_MAINCK"> Main Clock (MAINCK)
  88. // <CLK_SRC_OPTION_PLLACK"> PLLA Clock (PLLACK)
  89. // <CLK_SRC_OPTION_UPLLCKDIV"> UDPLL with Divider (MCKR UPLLDIV2)
  90. // <i> This defines the clock source for MCKR
  91. // <id> clk_gen_mckr_oscillator
  92. #ifndef CONF_CLK_GEN_MCKR_SRC
  93. #define CONF_CLK_GEN_MCKR_SRC CLK_SRC_OPTION_PLLACK
  94. #endif
  95. // <q> Enable Clock_MCKR
  96. // <i> Indicates whether MCKR is enabled or disable
  97. // <id> clk_gen_mckr_arch_enable
  98. #ifndef CONF_CLK_MCKR_ENABLE
  99. #define CONF_CLK_MCKR_ENABLE 1
  100. #endif
  101. // </h>
  102. // <h>
  103. // <o> Master Clock Prescaler
  104. // <0=> 1
  105. // <1=> 2
  106. // <2=> 4
  107. // <3=> 8
  108. // <4=> 16
  109. // <5=> 32
  110. // <6=> 64
  111. // <7=> 3
  112. // <i> Select the clock prescaler.
  113. // <id> mckr_presc
  114. #ifndef CONF_MCKR_PRESC
  115. #define CONF_MCKR_PRESC 0
  116. #endif
  117. // </h>
  118. // </e>// <e> Clock_MCK configuration
  119. // <i> Indicates whether MCK configuration is enabled or not
  120. // <id> enable_clk_gen_mck
  121. #ifndef CONF_CLK_MCK_CONFIG
  122. #define CONF_CLK_MCK_CONFIG 1
  123. #endif
  124. //<h> Clock Generator
  125. // <y> clock generator MCK source
  126. // <CLK_SRC_OPTION_MCKR"> Master Clock Controller (PMC_MCKR)
  127. // <i> This defines the clock source for MCK
  128. // <id> clk_gen_mck_oscillator
  129. #ifndef CONF_CLK_GEN_MCK_SRC
  130. #define CONF_CLK_GEN_MCK_SRC CLK_SRC_OPTION_MCKR
  131. #endif
  132. // </h>
  133. // <h>
  134. //<o> Master Clock Controller Divider MCK divider
  135. // <0=> 1
  136. // <1=> 2
  137. // <3=> 3
  138. // <2=> 4
  139. // <i> Select the master clock divider.
  140. // <id> mck_div
  141. #ifndef CONF_MCK_DIV
  142. #define CONF_MCK_DIV 1
  143. #endif
  144. // </h>
  145. // </e>// <e> Clock_SYSTICK configuration
  146. // <i> Indicates whether SYSTICK configuration is enabled or not
  147. // <id> enable_clk_gen_systick
  148. #ifndef CONF_CLK_SYSTICK_CONFIG
  149. #define CONF_CLK_SYSTICK_CONFIG 1
  150. #endif
  151. //<h> Clock Generator
  152. // <y> clock generator SYSTICK source
  153. // <CLK_SRC_OPTION_MCKR"> Master Clock Controller (PMC_MCKR)
  154. // <i> This defines the clock source for SYSTICK
  155. // <id> clk_gen_systick_oscillator
  156. #ifndef CONF_CLK_GEN_SYSTICK_SRC
  157. #define CONF_CLK_GEN_SYSTICK_SRC CLK_SRC_OPTION_MCKR
  158. #endif
  159. // </h>
  160. // <h>
  161. // <o> Systick clock divider
  162. // <8=> 8
  163. // <i> Select systick clock divider
  164. // <id> systick_clock_div
  165. #ifndef CONF_SYSTICK_DIV
  166. #define CONF_SYSTICK_DIV 8
  167. #endif
  168. // </h>
  169. // </e>// <e> Clock_FCLK configuration
  170. // <i> Indicates whether FCLK configuration is enabled or not
  171. // <id> enable_clk_gen_fclk
  172. #ifndef CONF_CLK_FCLK_CONFIG
  173. #define CONF_CLK_FCLK_CONFIG 1
  174. #endif
  175. //<h> Clock Generator
  176. // <y> clock generator FCLK source
  177. // <CLK_SRC_OPTION_MCKR"> Master Clock Controller (PMC_MCKR)
  178. // <i> This defines the clock source for FCLK
  179. // <id> clk_gen_fclk_oscillator
  180. #ifndef CONF_CLK_GEN_FCLK_SRC
  181. #define CONF_CLK_GEN_FCLK_SRC CLK_SRC_OPTION_MCKR
  182. #endif
  183. // </h>
  184. // <h>
  185. // </h>
  186. // </e>// <e> Clock_GCLK0 configuration
  187. // <i> Indicates whether GCLK0 configuration is enabled or not
  188. // <id> enable_clk_gen_gclk0
  189. #ifndef CONF_CLK_GCLK0_CONFIG
  190. #define CONF_CLK_GCLK0_CONFIG 1
  191. #endif
  192. //<h> Clock Generator
  193. // <y> clock generator GCLK0 source
  194. // <CLK_SRC_OPTION_SLCK"> Slow Clock (SLCK)
  195. // <CLK_SRC_OPTION_MAINCK"> Main Clock (MAINCK)
  196. // <CLK_SRC_OPTION_UPLLCK"> USB 480M Clock (UPLLCK)
  197. // <CLK_SRC_OPTION_PLLACK"> PLLA Clock (PLLACK)
  198. // <CLK_SRC_OPTION_MCK"> Master Clock (MCK)
  199. // <i> This defines the clock source for GCLK0
  200. // <id> clk_gen_gclk0_oscillator
  201. #ifndef CONF_CLK_GEN_GCLK0_SRC
  202. #define CONF_CLK_GEN_GCLK0_SRC CLK_SRC_OPTION_MCK
  203. #endif
  204. // <q> Enable Clock_GCLK0
  205. // <i> Indicates whether GCLK0 is enabled or disable
  206. // <id> clk_gen_gclk0_arch_enable
  207. #ifndef CONF_CLK_GCLK0_ENABLE
  208. #define CONF_CLK_GCLK0_ENABLE 1
  209. #endif
  210. // </h>
  211. // <h>
  212. // <q> Enable GCLK0 GCLKEN
  213. // <i> Indicates whether GCLK0 GCLKEN is enabled or disable
  214. // <id> gclk0_gclken_enable
  215. #ifndef CONF_GCLK0_GCLKEN_ENABLE
  216. #define CONF_GCLK0_GCLKEN_ENABLE 0
  217. #endif
  218. // <o> Generic Clock GCLK0 divider <1-256>
  219. // <i> Select the clock divider (divider = GCLKDIV + 1).
  220. // <id> gclk0_div
  221. #ifndef CONF_GCLK0_DIV
  222. #define CONF_GCLK0_DIV 2
  223. #endif
  224. // </h>
  225. // </e>// <e> Clock_GCLK1 configuration
  226. // <i> Indicates whether GCLK1 configuration is enabled or not
  227. // <id> enable_clk_gen_gclk1
  228. #ifndef CONF_CLK_GCLK1_CONFIG
  229. #define CONF_CLK_GCLK1_CONFIG 1
  230. #endif
  231. //<h> Clock Generator
  232. // <y> clock generator GCLK1 source
  233. // <CLK_SRC_OPTION_SLCK"> Slow Clock (SLCK)
  234. // <CLK_SRC_OPTION_MAINCK"> Main Clock (MAINCK)
  235. // <CLK_SRC_OPTION_UPLLCK"> USB 480M Clock (UPLLCK)
  236. // <CLK_SRC_OPTION_PLLACK"> PLLA Clock (PLLACK)
  237. // <CLK_SRC_OPTION_MCK"> Master Clock (MCK)
  238. // <i> This defines the clock source for GCLK1
  239. // <id> clk_gen_gclk1_oscillator
  240. #ifndef CONF_CLK_GEN_GCLK1_SRC
  241. #define CONF_CLK_GEN_GCLK1_SRC CLK_SRC_OPTION_PLLACK
  242. #endif
  243. // <q> Enable Clock_GCLK1
  244. // <i> Indicates whether GCLK1 is enabled or disable
  245. // <id> clk_gen_gclk1_arch_enable
  246. #ifndef CONF_CLK_GCLK1_ENABLE
  247. #define CONF_CLK_GCLK1_ENABLE 1
  248. #endif
  249. // </h>
  250. // <h>
  251. // <q> Enable GCLK1 GCLKEN
  252. // <i> Indicates whether GCLK1 GCLKEN is enabled or disable
  253. // <id> gclk1_gclken_enable
  254. #ifndef CONF_GCLK1_GCLKEN_ENABLE
  255. #define CONF_GCLK1_GCLKEN_ENABLE 0
  256. #endif
  257. // <o> Generic Clock GCLK1 divider <1-256>
  258. // <i> Select the clock divider (divider = GCLKDIV + 1).
  259. // <id> gclk1_div
  260. #ifndef CONF_GCLK1_DIV
  261. #define CONF_GCLK1_DIV 3
  262. #endif
  263. // </h>
  264. // </e>// <e> Clock_PCK0 configuration
  265. // <i> Indicates whether PCK0 configuration is enabled or not
  266. // <id> enable_clk_gen_pck0
  267. #ifndef CONF_CLK_PCK0_CONFIG
  268. #define CONF_CLK_PCK0_CONFIG 1
  269. #endif
  270. //<h> Clock Generator
  271. // <y> clock generator PCK0 source
  272. // <CLK_SRC_OPTION_SLCK"> Slow Clock (SLCK)
  273. // <CLK_SRC_OPTION_MAINCK"> Main Clock (MAINCK)
  274. // <CLK_SRC_OPTION_UPLLCKDIV"> UDPLL with Divider (MCKR UPLLDIV2)
  275. // <CLK_SRC_OPTION_PLLACK"> PLLA Clock (PLLACK)
  276. // <CLK_SRC_OPTION_MCK"> Master Clock (MCK)
  277. // <i> This defines the clock source for PCK0
  278. // <id> clk_gen_pck0_oscillator
  279. #ifndef CONF_CLK_GEN_PCK0_SRC
  280. #define CONF_CLK_GEN_PCK0_SRC CLK_SRC_OPTION_MAINCK
  281. #endif
  282. // <q> Enable Clock_PCK0
  283. // <i> Indicates whether PCK0 is enabled or disable
  284. // <id> clk_gen_pck0_arch_enable
  285. #ifndef CONF_CLK_PCK0_ENABLE
  286. #define CONF_CLK_PCK0_ENABLE 0
  287. #endif
  288. // </h>
  289. // <h>
  290. // <o> Programmable Clock Controller Prescaler <1-256>
  291. // <i> Select the clock prescaler (prescaler = PRESC + 1).
  292. // <id> pck0_presc
  293. #ifndef CONF_PCK0_PRESC
  294. #define CONF_PCK0_PRESC 1
  295. #endif
  296. // </h>
  297. // </e>// <e> Clock_PCK1 configuration
  298. // <i> Indicates whether PCK1 configuration is enabled or not
  299. // <id> enable_clk_gen_pck1
  300. #ifndef CONF_CLK_PCK1_CONFIG
  301. #define CONF_CLK_PCK1_CONFIG 1
  302. #endif
  303. //<h> Clock Generator
  304. // <y> clock generator PCK1 source
  305. // <CLK_SRC_OPTION_SLCK"> Slow Clock (SLCK)
  306. // <CLK_SRC_OPTION_MAINCK"> Main Clock (MAINCK)
  307. // <CLK_SRC_OPTION_UPLLCKDIV"> UDPLL with Divider (MCKR UPLLDIV2)
  308. // <CLK_SRC_OPTION_PLLACK"> PLLA Clock (PLLACK)
  309. // <CLK_SRC_OPTION_MCK"> Master Clock (MCK)
  310. // <i> This defines the clock source for PCK1
  311. // <id> clk_gen_pck1_oscillator
  312. #ifndef CONF_CLK_GEN_PCK1_SRC
  313. #define CONF_CLK_GEN_PCK1_SRC CLK_SRC_OPTION_MAINCK
  314. #endif
  315. // <q> Enable Clock_PCK1
  316. // <i> Indicates whether PCK1 is enabled or disable
  317. // <id> clk_gen_pck1_arch_enable
  318. #ifndef CONF_CLK_PCK1_ENABLE
  319. #define CONF_CLK_PCK1_ENABLE 0
  320. #endif
  321. // </h>
  322. // <h>
  323. // <o> Programmable Clock Controller Prescaler <1-256>
  324. // <i> Select the clock prescaler (prescaler = PRESC + 1).
  325. // <id> pck1_presc
  326. #ifndef CONF_PCK1_PRESC
  327. #define CONF_PCK1_PRESC 2
  328. #endif
  329. // </h>
  330. // </e>// <e> Clock_PCK2 configuration
  331. // <i> Indicates whether PCK2 configuration is enabled or not
  332. // <id> enable_clk_gen_pck2
  333. #ifndef CONF_CLK_PCK2_CONFIG
  334. #define CONF_CLK_PCK2_CONFIG 1
  335. #endif
  336. //<h> Clock Generator
  337. // <y> clock generator PCK2 source
  338. // <CLK_SRC_OPTION_SLCK"> Slow Clock (SLCK)
  339. // <CLK_SRC_OPTION_MAINCK"> Main Clock (MAINCK)
  340. // <CLK_SRC_OPTION_UPLLCKDIV"> UDPLL with Divider (MCKR UPLLDIV2)
  341. // <CLK_SRC_OPTION_PLLACK"> PLLA Clock (PLLACK)
  342. // <CLK_SRC_OPTION_MCK"> Master Clock (MCK)
  343. // <i> This defines the clock source for PCK2
  344. // <id> clk_gen_pck2_oscillator
  345. #ifndef CONF_CLK_GEN_PCK2_SRC
  346. #define CONF_CLK_GEN_PCK2_SRC CLK_SRC_OPTION_MAINCK
  347. #endif
  348. // <q> Enable Clock_PCK2
  349. // <i> Indicates whether PCK2 is enabled or disable
  350. // <id> clk_gen_pck2_arch_enable
  351. #ifndef CONF_CLK_PCK2_ENABLE
  352. #define CONF_CLK_PCK2_ENABLE 0
  353. #endif
  354. // </h>
  355. // <h>
  356. // <o> Programmable Clock Controller Prescaler <1-256>
  357. // <i> Select the clock prescaler (prescaler = PRESC + 1).
  358. // <id> pck2_presc
  359. #ifndef CONF_PCK2_PRESC
  360. #define CONF_PCK2_PRESC 3
  361. #endif
  362. // </h>
  363. // </e>// <e> Clock_PCK3 configuration
  364. // <i> Indicates whether PCK3 configuration is enabled or not
  365. // <id> enable_clk_gen_pck3
  366. #ifndef CONF_CLK_PCK3_CONFIG
  367. #define CONF_CLK_PCK3_CONFIG 1
  368. #endif
  369. //<h> Clock Generator
  370. // <y> clock generator PCK3 source
  371. // <CLK_SRC_OPTION_SLCK"> Slow Clock (SLCK)
  372. // <CLK_SRC_OPTION_MAINCK"> Main Clock (MAINCK)
  373. // <CLK_SRC_OPTION_UPLLCKDIV"> UDPLL with Divider (MCKR UPLLDIV2)
  374. // <CLK_SRC_OPTION_PLLACK"> PLLA Clock (PLLACK)
  375. // <CLK_SRC_OPTION_MCK"> Master Clock (MCK)
  376. // <i> This defines the clock source for PCK3
  377. // <id> clk_gen_pck3_oscillator
  378. #ifndef CONF_CLK_GEN_PCK3_SRC
  379. #define CONF_CLK_GEN_PCK3_SRC CLK_SRC_OPTION_MAINCK
  380. #endif
  381. // <q> Enable Clock_PCK3
  382. // <i> Indicates whether PCK3 is enabled or disable
  383. // <id> clk_gen_pck3_arch_enable
  384. #ifndef CONF_CLK_PCK3_ENABLE
  385. #define CONF_CLK_PCK3_ENABLE 0
  386. #endif
  387. // </h>
  388. // <h>
  389. // <o> Programmable Clock Controller Prescaler <1-256>
  390. // <i> Select the clock prescaler (prescaler = PRESC + 1).
  391. // <id> pck3_presc
  392. #ifndef CONF_PCK3_PRESC
  393. #define CONF_PCK3_PRESC 4
  394. #endif
  395. // </h>
  396. // </e>// <e> Clock_PCK4 configuration
  397. // <i> Indicates whether PCK4 configuration is enabled or not
  398. // <id> enable_clk_gen_pck4
  399. #ifndef CONF_CLK_PCK4_CONFIG
  400. #define CONF_CLK_PCK4_CONFIG 1
  401. #endif
  402. //<h> Clock Generator
  403. // <y> clock generator PCK4 source
  404. // <CLK_SRC_OPTION_SLCK"> Slow Clock (SLCK)
  405. // <CLK_SRC_OPTION_MAINCK"> Main Clock (MAINCK)
  406. // <CLK_SRC_OPTION_UPLLCKDIV"> UDPLL with Divider (MCKR UPLLDIV2)
  407. // <CLK_SRC_OPTION_PLLACK"> PLLA Clock (PLLACK)
  408. // <CLK_SRC_OPTION_MCK"> Master Clock (MCK)
  409. // <i> This defines the clock source for PCK4
  410. // <id> clk_gen_pck4_oscillator
  411. #ifndef CONF_CLK_GEN_PCK4_SRC
  412. #define CONF_CLK_GEN_PCK4_SRC CLK_SRC_OPTION_MAINCK
  413. #endif
  414. // <q> Enable Clock_PCK4
  415. // <i> Indicates whether PCK4 is enabled or disable
  416. // <id> clk_gen_pck4_arch_enable
  417. #ifndef CONF_CLK_PCK4_ENABLE
  418. #define CONF_CLK_PCK4_ENABLE 0
  419. #endif
  420. // </h>
  421. // <h>
  422. // <o> Programmable Clock Controller Prescaler <1-256>
  423. // <i> Select the clock prescaler (prescaler = PRESC + 1).
  424. // <id> pck4_presc
  425. #ifndef CONF_PCK4_PRESC
  426. #define CONF_PCK4_PRESC 5
  427. #endif
  428. // </h>
  429. // </e>// <e> Clock_PCK5 configuration
  430. // <i> Indicates whether PCK5 configuration is enabled or not
  431. // <id> enable_clk_gen_pck5
  432. #ifndef CONF_CLK_PCK5_CONFIG
  433. #define CONF_CLK_PCK5_CONFIG 1
  434. #endif
  435. //<h> Clock Generator
  436. // <y> clock generator PCK5 source
  437. // <CLK_SRC_OPTION_SLCK"> Slow Clock (SLCK)
  438. // <CLK_SRC_OPTION_MAINCK"> Main Clock (MAINCK)
  439. // <CLK_SRC_OPTION_UPLLCKDIV"> UDPLL with Divider (MCKR UPLLDIV2)
  440. // <CLK_SRC_OPTION_PLLACK"> PLLA Clock (PLLACK)
  441. // <CLK_SRC_OPTION_MCK"> Master Clock (MCK)
  442. // <i> This defines the clock source for PCK5
  443. // <id> clk_gen_pck5_oscillator
  444. #ifndef CONF_CLK_GEN_PCK5_SRC
  445. #define CONF_CLK_GEN_PCK5_SRC CLK_SRC_OPTION_MAINCK
  446. #endif
  447. // <q> Enable Clock_PCK5
  448. // <i> Indicates whether PCK5 is enabled or disable
  449. // <id> clk_gen_pck5_arch_enable
  450. #ifndef CONF_CLK_PCK5_ENABLE
  451. #define CONF_CLK_PCK5_ENABLE 0
  452. #endif
  453. // </h>
  454. // <h>
  455. // <o> Programmable Clock Controller Prescaler <1-256>
  456. // <i> Select the clock prescaler (prescaler = PRESC + 1).
  457. // <id> pck5_presc
  458. #ifndef CONF_PCK5_PRESC
  459. #define CONF_PCK5_PRESC 6
  460. #endif
  461. // </h>
  462. // </e>// <e> Clock_PCK6 configuration
  463. // <i> Indicates whether PCK6 configuration is enabled or not
  464. // <id> enable_clk_gen_pck6
  465. #ifndef CONF_CLK_PCK6_CONFIG
  466. #define CONF_CLK_PCK6_CONFIG 1
  467. #endif
  468. //<h> Clock Generator
  469. // <y> clock generator PCK6 source
  470. // <CLK_SRC_OPTION_SLCK"> Slow Clock (SLCK)
  471. // <CLK_SRC_OPTION_MAINCK"> Main Clock (MAINCK)
  472. // <CLK_SRC_OPTION_UPLLCKDIV"> UDPLL with Divider (MCKR UPLLDIV2)
  473. // <CLK_SRC_OPTION_PLLACK"> PLLA Clock (PLLACK)
  474. // <CLK_SRC_OPTION_MCK"> Master Clock (MCK)
  475. // <i> This defines the clock source for PCK6
  476. // <id> clk_gen_pck6_oscillator
  477. #ifndef CONF_CLK_GEN_PCK6_SRC
  478. #define CONF_CLK_GEN_PCK6_SRC CLK_SRC_OPTION_MAINCK
  479. #endif
  480. // <q> Enable Clock_PCK6
  481. // <i> Indicates whether PCK6 is enabled or disable
  482. // <id> clk_gen_pck6_arch_enable
  483. #ifndef CONF_CLK_PCK6_ENABLE
  484. #define CONF_CLK_PCK6_ENABLE 0
  485. #endif
  486. // </h>
  487. // <h>
  488. // <o> Programmable Clock Controller Prescaler <1-256>
  489. // <i> Select the clock prescaler (prescaler = PRESC + 1).
  490. // <id> pck6_presc
  491. #ifndef CONF_PCK6_PRESC
  492. #define CONF_PCK6_PRESC 7
  493. #endif
  494. // </h>
  495. // </e>// <e> Clock_USB_480M configuration
  496. // <i> Indicates whether USB_480M configuration is enabled or not
  497. // <id> enable_clk_gen_usb_480m
  498. #ifndef CONF_CLK_USB_480M_CONFIG
  499. #define CONF_CLK_USB_480M_CONFIG 1
  500. #endif
  501. //<h> Clock Generator
  502. // <y> clock generator USB_480M source
  503. // <CLK_SRC_OPTION_UPLLCK"> USB 480M Clock (UPLLCK)
  504. // <i> This defines the clock source for USB_480M
  505. // <id> clk_gen_usb_480m_oscillator
  506. #ifndef CONF_CLK_GEN_USB_480M_SRC
  507. #define CONF_CLK_GEN_USB_480M_SRC CLK_SRC_OPTION_UPLLCK
  508. #endif
  509. // </h>
  510. // <h>
  511. // </h>
  512. // </e>// <e> Clock_USB_48M configuration
  513. // <i> Indicates whether USB_48M configuration is enabled or not
  514. // <id> enable_clk_gen_usb_48m
  515. #ifndef CONF_CLK_USB_48M_CONFIG
  516. #define CONF_CLK_USB_48M_CONFIG 1
  517. #endif
  518. //<h> Clock Generator
  519. // <y> clock generator USB_48M source
  520. // <CLK_SRC_OPTION_PLLACK"> PLLA Clock (PLLACK)
  521. // <CLK_SRC_OPTION_UPLLCKDIV"> UDPLL with Divider (MCKR UPLLDIV2)
  522. // <i> This defines the clock source for USB_48M
  523. // <id> clk_gen_usb_48m_oscillator
  524. #ifndef CONF_CLK_GEN_USB_48M_SRC
  525. #define CONF_CLK_GEN_USB_48M_SRC CLK_SRC_OPTION_UPLLCKDIV
  526. #endif
  527. // <q> Enable Clock_USB_48M
  528. // <i> Indicates whether USB_48M is enabled or disable
  529. // <id> clk_gen_usb_48m_arch_enable
  530. #ifndef CONF_CLK_USB_48M_ENABLE
  531. #define CONF_CLK_USB_48M_ENABLE 1
  532. #endif
  533. // </h>
  534. // <h>
  535. // <o> USB Clock Controller Divider <1-16>
  536. // <i> Select the USB clock divider (divider = USBDIV + 1).
  537. // <id> usb_48m_div
  538. #ifndef CONF_USB_48M_DIV
  539. #define CONF_USB_48M_DIV 5
  540. #endif
  541. // </h>
  542. // </e>// <e> Clock_SLCK2 configuration
  543. // <i> Indicates whether SLCK2 configuration is enabled or not
  544. // <id> enable_clk_gen_slck2
  545. #ifndef CONF_CLK_SLCK2_CONFIG
  546. #define CONF_CLK_SLCK2_CONFIG 1
  547. #endif
  548. //<h> Clock Generator
  549. // <y> clock generator SLCK2 source
  550. // <CLK_SRC_OPTION_SLCK"> Slow Clock (SLCK)
  551. // <i> This defines the clock source for SLCK2
  552. // <id> clk_gen_slck2_oscillator
  553. #ifndef CONF_CLK_GEN_SLCK2_SRC
  554. #define CONF_CLK_GEN_SLCK2_SRC CLK_SRC_OPTION_SLCK
  555. #endif
  556. // </h>
  557. // <h>
  558. // </h>
  559. // </e>
  560. // <e> System Configuration
  561. // <i> Indicates whether configuration for system is enabled or not
  562. // <id> enable_hclk_clock
  563. #ifndef CONF_SYSTEM_CONFIG
  564. #define CONF_SYSTEM_CONFIG 1
  565. #endif
  566. // <h> Processor Clock Settings
  567. // <y> Processor Clock source
  568. // <MCKR"> Master Clock Controller (PMC_MCKR)
  569. // <i> This defines the clock source for the HCLK (Processor clock)
  570. // <id> hclk_clock_source
  571. #ifndef CONF_HCLK_SRC
  572. #define CONF_HCLK_SRC MCKR
  573. #endif
  574. // <o> Flash Wait State
  575. // <0=> 1 cycle
  576. // <1=> 2 cycles
  577. // <2=> 3 cycles
  578. // <3=> 4 cycles
  579. // <4=> 5 cycles
  580. // <5=> 6 cycles
  581. // <6=> 7 cycles
  582. // <i> This field defines the number of wait states for read and write operations.
  583. // <id> efc_fws
  584. #ifndef CONF_EFC_WAIT_STATE
  585. #define CONF_EFC_WAIT_STATE 5
  586. #endif
  587. // </h>
  588. // </e>
  589. // <e> SysTick Clock
  590. // <id> enable_systick_clk_clock
  591. #ifndef CONF_SYSTICK_CLK_CONFIG
  592. #define CONF_SYSTICK_CLK_CONFIG 1
  593. #endif
  594. // <y> SysTick Clock source
  595. // <MCKR"> Master Clock Controller (PMC_MCKR)
  596. // <i> This defines the clock source for the SysTick Clock
  597. // <id> systick_clk_clock_source
  598. #ifndef CONF_SYSTICK_CLK_SRC
  599. #define CONF_SYSTICK_CLK_SRC MCKR
  600. #endif
  601. // <o> SysTick Clock Divider
  602. // <8=> 8
  603. // <i> Fixed to 8 if Systick is not using Processor clock
  604. // <id> systick_clk_clock_div
  605. #ifndef CONF_SYSTICK_CLK_DIV
  606. #define CONF_SYSTICK_CLK_DIV 8
  607. #endif
  608. // </e>
  609. // <e> OSC32K Oscillator Configuration
  610. // <i> Indicates whether configuration for OSC32K is enabled or not
  611. // <id> enable_osc32k
  612. #ifndef CONF_OSC32K_CONFIG
  613. #define CONF_OSC32K_CONFIG 1
  614. #endif
  615. // <h> OSC32K Oscillator Control
  616. // <q> OSC32K Oscillator Enable
  617. // <i> Indicates whether OSC32K Oscillator is enabled or not
  618. // <id> osc32k_arch_enable
  619. #ifndef CONF_OSC32K_ENABLE
  620. #define CONF_OSC32K_ENABLE 0
  621. #endif
  622. // </h>
  623. // </e>
  624. // <e> XOSC32K Oscillator Configuration
  625. // <i> Indicates whether configuration for XOSC32K is enabled or not
  626. // <id> enable_xosc32k
  627. #ifndef CONF_XOSC32K_CONFIG
  628. #define CONF_XOSC32K_CONFIG 0
  629. #endif
  630. // <h> XOSC32K Oscillator Control
  631. // <y> Oscillator Bypass Select
  632. // <CONF_XOSC32K_NO_BYPASS"> The 32kHz crystal oscillator is not bypassed.
  633. // <CONF_XOSC32K_BYPASS"> The 32kHz crystal oscillator is bypassed.
  634. // <i> Indicates whether XOSC32K is bypassed.
  635. // <id> xosc32k_bypass
  636. #ifndef CONF_XOSC32K
  637. #define CONF_XOSC32K CONF_XOSC32K_NO_BYPASS
  638. #endif
  639. // <q> XOSC32K Oscillator Enable
  640. // <i> Indicates whether XOSC32K Oscillator is enabled or not
  641. // <id> xosc32k_arch_enable
  642. #ifndef CONF_XOSC32K_ENABLE
  643. #define CONF_XOSC32K_ENABLE 0
  644. #endif
  645. // </h>
  646. // </e>
  647. // <e> OSC12M Oscillator Configuration
  648. // <i> Indicates whether configuration for OSC12M is enabled or not
  649. // <id> enable_osc12m
  650. #ifndef CONF_OSC12M_CONFIG
  651. #define CONF_OSC12M_CONFIG 0
  652. #endif
  653. // <h> OSC12M Oscillator Control
  654. // <q> OSC12M Oscillator Enable
  655. // <i> Indicates whether OSC12M Oscillator is enabled or not.
  656. // <id> osc12m_arch_enable
  657. #ifndef CONF_OSC12M_ENABLE
  658. #define CONF_OSC12M_ENABLE 0
  659. #endif
  660. // <o> OSC12M selector
  661. // <0=> 4000000
  662. // <1=> 8000000
  663. // <2=> 12000000
  664. // <i> Select the frequency of embedded fast RC oscillator.
  665. // <id> osc12m_selector
  666. #ifndef CONF_OSC12M_SELECTOR
  667. #define CONF_OSC12M_SELECTOR 2
  668. #endif
  669. // </h>
  670. // </e>
  671. // <e> XOSC20M Oscillator Configuration
  672. // <i> Indicates whether configuration for XOSC20M is enabled or not.
  673. // <id> enable_xosc20m
  674. #ifndef CONF_XOSC20M_CONFIG
  675. #define CONF_XOSC20M_CONFIG 1
  676. #endif
  677. // <h> XOSC20M Oscillator Control
  678. // <o> XOSC20M selector <3000000-20000000>
  679. // <i> Select the frequency of crystal or ceramic resonator oscillator.
  680. // <id> xosc20m_selector
  681. #ifndef CONF_XOSC20M_SELECTOR
  682. #define CONF_XOSC20M_SELECTOR 12000000
  683. #endif
  684. // <o> Start up time for the external oscillator (ms): <0-256>
  685. // <i> Select start-up time.
  686. // <id> xosc20m_startup_time
  687. #ifndef CONF_XOSC20M_STARTUP_TIME
  688. #define CONF_XOSC20M_STARTUP_TIME 62
  689. #endif
  690. // <y> Oscillator Bypass Select
  691. // <CONF_XOSC20M_NO_BYPASS"> The external crystal oscillator is not bypassed.
  692. // <CONF_XOSC20M_BYPASS"> The external crystal oscillator is bypassed.
  693. // <i> Indicates whether XOSC20M is bypassed.
  694. // <id> xosc20m_bypass
  695. #ifndef CONF_XOSC20M
  696. #define CONF_XOSC20M CONF_XOSC20M_NO_BYPASS
  697. #endif
  698. // <q> XOSC20M Oscillator Enable
  699. // <i> Indicates whether XOSC20M Oscillator is enabled or not
  700. // <id> xosc20m_arch_enable
  701. #ifndef CONF_XOSC20M_ENABLE
  702. #define CONF_XOSC20M_ENABLE 1
  703. #endif
  704. // </h>
  705. // </e>
  706. // <e> PLLACK Oscillator Configuration
  707. // <i> Indicates whether configuration for PLLACK is enabled or not
  708. // <id> enable_pllack
  709. #ifndef CONF_PLLACK_CONFIG
  710. #define CONF_PLLACK_CONFIG 1
  711. #endif
  712. // <y> PLLACK Reference Clock Source
  713. // <MAINCK"> Main Clock (MAINCK)
  714. // <i> Select the clock source.
  715. // <id> pllack_ref_clock
  716. #ifndef CONF_PLLACK_CLK
  717. #define CONF_PLLACK_CLK MAINCK
  718. #endif
  719. // <h> PLLACK Oscillator Control
  720. // <q> PLLACK Oscillator Enable
  721. // <i> Indicates whether PLLACK Oscillator is enabled or not
  722. // <id> pllack_arch_enable
  723. #ifndef CONF_PLLACK_ENABLE
  724. #define CONF_PLLACK_ENABLE 1
  725. #endif
  726. // <o> PLLA Frontend Divider (DIVA) <1-255>
  727. // <i> Select the clock divider
  728. // <id> pllack_div
  729. #ifndef CONF_PLLACK_DIV
  730. #define CONF_PLLACK_DIV 1
  731. #endif
  732. // <o> PLLACK Muliplier <1-62>
  733. // <i> Indicates PLLA multiplier (multiplier = MULA + 1).
  734. // <id> pllack_mul
  735. #ifndef CONF_PLLACK_MUL
  736. #define CONF_PLLACK_MUL 25
  737. #endif
  738. // </h>
  739. // </e>
  740. // <e> UPLLCK Oscillator Configuration
  741. // <i> Indicates whether configuration for UPLLCK is enabled or not
  742. // <id> enable_upllck
  743. #ifndef CONF_UPLLCK_CONFIG
  744. #define CONF_UPLLCK_CONFIG 1
  745. #endif
  746. // <y> UPLLCK Reference Clock Source
  747. // <XOSC20M"> External 3-20MHz Oscillator (XOSC20M)
  748. // <i> Select the clock source,only when the input frequency is 12M or 16M, the upllck output is 480M.
  749. // <id> upllck_ref_clock
  750. #ifndef CONF_UPLLCK_CLK
  751. #define CONF_UPLLCK_CLK XOSC20M
  752. #endif
  753. // <h> UPLLCK Oscillator Control
  754. // <q> UPLLCK Oscillator Enable
  755. // <i> Indicates whether UPLLCK Oscillator is enabled or not
  756. // <id> upllck_arch_enable
  757. #ifndef CONF_UPLLCK_ENABLE
  758. #define CONF_UPLLCK_ENABLE 1
  759. #endif
  760. // </h>
  761. // </e>
  762. // <e> UPLLCKDIV Oscillator Configuration
  763. // <i> Indicates whether configuration for UPLLCKDIV is enabled or not
  764. // <id> enable_upllckdiv
  765. #ifndef CONF_UPLLCKDIV_CONFIG
  766. #define CONF_UPLLCKDIV_CONFIG 1
  767. #endif
  768. // <y> UPLLCKDIV Reference Clock Source
  769. // <UPLLCK"> USB 480M Clock (UPLLCK)
  770. // <i> Select the clock source.
  771. // <id> upllckdiv_ref_clock
  772. #ifndef CONF_UPLLCKDIV_CLK
  773. #define CONF_UPLLCKDIV_CLK UPLLCK
  774. #endif
  775. // <h> UPLLCKDIV Oscillator Control
  776. // <o> UPLLCKDIV Clock Divider
  777. // <0=> 1
  778. // <1=> 2
  779. // <i> Select the clock divider.
  780. // <id> upllckdiv_div
  781. #ifndef CONF_UPLLCKDIV_DIV
  782. #define CONF_UPLLCKDIV_DIV 1
  783. #endif
  784. // </h>
  785. // </e>
  786. // <e> MCK/8
  787. // <id> enable_mck_div_8
  788. #ifndef CONF_MCK_DIV_8_CONFIG
  789. #define CONF_MCK_DIV_8_CONFIG 0
  790. #endif
  791. // <o> MCK/8 Source
  792. // <0=> Master Clock (MCK)
  793. // <id> mck_div_8_src
  794. #ifndef CONF_MCK_DIV_8_SRC
  795. #define CONF_MCK_DIV_8_SRC 0
  796. #endif
  797. // </e>
  798. // <e> External Clock Input Configuration
  799. // <id> enable_dummy_ext
  800. #ifndef CONF_DUMMY_EXT_CONFIG
  801. #define CONF_DUMMY_EXT_CONFIG 1
  802. #endif
  803. // <o> External Clock Input Source
  804. // <i> All here are dummy values
  805. // <i> Refer to the peripherals settings for actual input information
  806. // <0=> Specific clock input from specific pin
  807. // <id> dummy_ext_src
  808. #ifndef CONF_DUMMY_EXT_SRC
  809. #define CONF_DUMMY_EXT_SRC 0
  810. #endif
  811. // </e>
  812. // <e> External Clock Configuration
  813. // <id> enable_dummy_ext_clk
  814. #ifndef CONF_DUMMY_EXT_CLK_CONFIG
  815. #define CONF_DUMMY_EXT_CLK_CONFIG 1
  816. #endif
  817. // <o> External Clock Source
  818. // <i> All here are dummy values
  819. // <i> Refer to the peripherals settings for actual input information
  820. // <0=> External Clock Input
  821. // <id> dummy_ext_clk_src
  822. #ifndef CONF_DUMMY_EXT_CLK_SRC
  823. #define CONF_DUMMY_EXT_CLK_SRC 0
  824. #endif
  825. // </e>
  826. // <<< end of configuration section >>>
  827. #endif // HPL_PMC_CONFIG_H