|
28 | 28 | * * SAMD20J18A (rev B)
|
29 | 29 | * * SAMD21J18A (rev B)
|
30 | 30 | * * SAML21J17B (rev B)
|
| 31 | + * * SAMC21N18A (rev E) |
31 | 32 | */
|
32 | 33 |
|
33 | 34 | /*
|
@@ -129,7 +130,7 @@ const command_s samd_cmd_list[] = {
|
129 | 130 | #define SAMD_STATUSB_PROT (1U << 16U)
|
130 | 131 |
|
131 | 132 | /* Device Identification Register (DID) */
|
132 |
| -#define SAMD_DID_MASK 0xff380000U |
| 133 | +#define SAMD_DID_MASK 0xfe380000U |
133 | 134 | #define SAMD_DID_CONST_VALUE 0x10000000U
|
134 | 135 | #define SAMD_DID_DEVSEL_MASK 0xffU
|
135 | 136 | #define SAMD_DID_DEVSEL_POS 0U
|
@@ -183,6 +184,24 @@ static const samd_part_s samd_d21_parts[] = {
|
183 | 184 | {0xff, 0, 0, 0}, /* Sentinel entry */
|
184 | 185 | };
|
185 | 186 |
|
| 187 | +static const samd_part_s samd_c21_parts[] = { |
| 188 | + {0x00, 'J', 18, 'A'}, /* SAMC21J18A */ |
| 189 | + {0x01, 'J', 17, 'A'}, /* SAMC21J17A */ |
| 190 | + {0x02, 'J', 16, 'A'}, /* SAMC21J16A */ |
| 191 | + {0x03, 'J', 15, 'A'}, /* SAMC21J15A */ |
| 192 | + {0x05, 'G', 18, 'A'}, /* SAMC21G18A */ |
| 193 | + {0x06, 'G', 17, 'A'}, /* SAMC21G17A */ |
| 194 | + {0x07, 'G', 16, 'A'}, /* SAMC21G16A */ |
| 195 | + {0x08, 'G', 15, 'A'}, /* SAMC21G15A */ |
| 196 | + {0x0a, 'E', 18, 'A'}, /* SAMC21E18A */ |
| 197 | + {0x0b, 'E', 17, 'A'}, /* SAMC21E17A */ |
| 198 | + {0x0c, 'E', 16, 'A'}, /* SAMC21E16A */ |
| 199 | + {0x0d, 'E', 15, 'A'}, /* SAMC21E15A */ |
| 200 | + {0x20, 'N', 18, 'A'}, /* SAMC21N18A */ |
| 201 | + {0x21, 'N', 17, 'A'}, /* SAMC21N17A */ |
| 202 | + {0xff, 0, 0, 0}, /* Sentinel entry */ |
| 203 | +}; |
| 204 | + |
186 | 205 | static const samd_part_s samd_l21_parts[] = {
|
187 | 206 | {0x00, 'J', 18, 'A'}, /* SAML21J18A */
|
188 | 207 | {0x01, 'J', 17, 'A'}, /* SAML21J17A */
|
@@ -379,6 +398,8 @@ samd_descr_s samd_parse_device_id(uint32_t did)
|
379 | 398 | samd.series = 20;
|
380 | 399 | break;
|
381 | 400 | case 1:
|
| 401 | + if (family == 2) |
| 402 | + parts = samd_c21_parts; |
382 | 403 | samd.series = 21;
|
383 | 404 | break;
|
384 | 405 | case 2:
|
|
0 commit comments