Loading...
Searching...
No Matches
cpu_conf_kinetis_k.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Eistec AB
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser General
5 * Public License v2.1. See the file LICENSE in the top level directory for more
6 * details.
7 */
8
21#ifndef CPU_CONF_KINETIS_K_H
22#define CPU_CONF_KINETIS_K_H
23
24#if (KINETIS_FAMILY == 2)
25#if (KINETIS_SUBFAMILY == 2)
26/* Kinetis K22 */
27#if defined(CPU_MODEL_MK22FX512VLH12) || \
28 defined(CPU_MODEL_MK22FN1M0VLH12) || \
29 defined(CPU_MODEL_MK22FX512VLK12) || \
30 defined(CPU_MODEL_MK22FN1M0VLK12) || \
31 defined(CPU_MODEL_MK22FX512VLL12) || \
32 defined(CPU_MODEL_MK22FN1M0VLL12) || \
33 defined(CPU_MODEL_MK22FX512VLQ12) || \
34 defined(CPU_MODEL_MK22FN1M0VLQ12) || \
35 defined(CPU_MODEL_MK22FX512VMC12) || \
36 defined(CPU_MODEL_MK22FN1M0VMC12) || \
37 defined(CPU_MODEL_MK22FX512VMD12) || \
38 defined(CPU_MODEL_MK22FN1M0VMD12)
39#include "vendor/MK22F12.h"
40#elif defined(CPU_MODEL_MK22FN128VDC10) || \
41 defined(CPU_MODEL_MK22FN128VLH10) || \
42 defined(CPU_MODEL_MK22FN128VLL10) || \
43 defined(CPU_MODEL_MK22FN128VMP10)
44#include "vendor/MK22F12810.h"
45#elif defined(CPU_MODEL_MK22FN128CAH12) || \
46 defined(CPU_MODEL_MK22FN256CAH12) || \
47 defined(CPU_MODEL_MK22FN256VDC12) || \
48 defined(CPU_MODEL_MK22FN256VLH12) || \
49 defined(CPU_MODEL_MK22FN256VLL12) || \
50 defined(CPU_MODEL_MK22FN256VMP12)
51#include "vendor/MK22F25612.h"
52#elif defined(CPU_MODEL_MK22FN512CAP12) || \
53 defined(CPU_MODEL_MK22FN512VDC12) || \
54 defined(CPU_MODEL_MK22FN512VFX12) || \
55 defined(CPU_MODEL_MK22FN512VLH12) || \
56 defined(CPU_MODEL_MK22FN512VLL12) || \
57 defined(CPU_MODEL_MK22FN512VMP12)
58#include "vendor/MK22F51212.h"
59#elif defined(CPU_MODEL_MK22FN1M0AVLH12) || \
60 defined(CPU_MODEL_MK22FN1M0AVLK12) || \
61 defined(CPU_MODEL_MK22FN1M0AVLL12) || \
62 defined(CPU_MODEL_MK22FN1M0AVLQ12) || \
63 defined(CPU_MODEL_MK22FN1M0AVMC12) || \
64 defined(CPU_MODEL_MK22FN1M0AVMD12) || \
65 defined(CPU_MODEL_MK22FX512AVLH12) || \
66 defined(CPU_MODEL_MK22FX512AVLK12) || \
67 defined(CPU_MODEL_MK22FX512AVLL12) || \
68 defined(CPU_MODEL_MK22FX512AVLQ12) || \
69 defined(CPU_MODEL_MK22FX512AVMC12) || \
70 defined(CPU_MODEL_MK22FX512AVMD12)
71#include "vendor/MK22FA12.h"
72#endif
73#elif (KINETIS_SUBFAMILY == 0)
74#if defined(CPU_MODEL_MK20DX64VLH7) || \
75 defined(CPU_MODEL_MK20DX128VLH7) || \
76 defined(CPU_MODEL_MK20DX256VLH7) || \
77 defined(CPU_MODEL_MK20DX64VLK7) || \
78 defined(CPU_MODEL_MK20DX128VLK7) || \
79 defined(CPU_MODEL_MK20DX256VLK7) || \
80 defined(CPU_MODEL_MK20DX128VLL7) || \
81 defined(CPU_MODEL_MK20DX256VLL7) || \
82 defined(CPU_MODEL_MK20DX64VMB7) || \
83 defined(CPU_MODEL_MK20DX128VMB7) || \
84 defined(CPU_MODEL_MK20DX256VMB7) || \
85 defined(CPU_MODEL_MK20DX128VML7) || \
86 defined(CPU_MODEL_MK20DX256VML7)
87#include "vendor/MK20D7.h"
88#endif
89#endif /* (KINETIS_SUBFAMILY == y) */
90#elif (KINETIS_FAMILY == 6)
91#if (KINETIS_SUBFAMILY == 0)
92#if defined(CPU_MODEL_MK60DN256VLL10) || \
93 defined(CPU_MODEL_MK60DN256VLQ10) || \
94 defined(CPU_MODEL_MK60DN256VMC10) || \
95 defined(CPU_MODEL_MK60DN256VMD10) || \
96 defined(CPU_MODEL_MK60DN512VLL10) || \
97 defined(CPU_MODEL_MK60DN512VLQ10) || \
98 defined(CPU_MODEL_MK60DN512VMC10) || \
99 defined(CPU_MODEL_MK60DN512VMD10) || \
100 defined(CPU_MODEL_MK60DX256VLL10) || \
101 defined(CPU_MODEL_MK60DX256VLQ10) || \
102 defined(CPU_MODEL_MK60DX256VMC10) || \
103 defined(CPU_MODEL_MK60DX256VMD10)
104#include "vendor/MK60D10.h"
105#endif
109#define KINETIS_HAVE_ADICLK_BUS_DIV_2 1
110
111#elif (KINETIS_SUBFAMILY == 4)
112#if defined(CPU_MODEL_MK64FN1M0CAJ12) || \
113 defined(CPU_MODEL_MK64FN1M0VDC12) || \
114 defined(CPU_MODEL_MK64FN1M0VLL12) || \
115 defined(CPU_MODEL_MK64FN1M0VLQ12) || \
116 defined(CPU_MODEL_MK64FN1M0VMD12) || \
117 defined(CPU_MODEL_MK64FX512VDC12) || \
118 defined(CPU_MODEL_MK64FX512VLL12) || \
119 defined(CPU_MODEL_MK64FX512VLQ12) || \
120 defined(CPU_MODEL_MK64FX512VMD12)
121#include "vendor/MK64F12.h"
122
131#define HWRNG_CLK_REG (SIM->SCGC6)
132#define HWRNG_CLK_REG_SHIFT (SIM_SCGC6_RNGA_SHIFT)
135#endif
136#endif /* (KINETIS_SUBFAMILY == y) */
137#endif /* (KINETIS_FAMILY == x) */
138
143#define FLASHPAGE_SIZE (4096U)
144#define FLASHPAGE_NUMOF ((KINETIS_ROMSIZE * 1024) / FLASHPAGE_SIZE)
145
146/* The minimum block size which can be written is 8B (Phrase). However, the
147 * erase block is always FLASHPAGE_SIZE.
148 */
149#define FLASHPAGE_BLOCK_PHRASE (8U)
150#define FLASHPAGE_WRITE_BLOCK_SIZE FLASHPAGE_BLOCK_PHRASE
151/* Writing should be always 8 bytes aligned */
152#define FLASHPAGE_WRITE_BLOCK_ALIGNMENT FLASHPAGE_BLOCK_PHRASE
153/* Section erase and programming must be 16 bytes aligned */
154#define FLASHPAGE_BLOCK_SECTION_ALIGNMENT (16U)
157#ifdef __cplusplus
158extern "C"
159{
160#endif
161
162#ifdef __cplusplus
163}
164#endif
165
166#endif /* CPU_CONF_KINETIS_K_H */