Skip to content

Commit 1173473

Browse files
mtc-mlxtom-van
authored andcommitted
flash/nor/atsame5: add PIC32CX-SG device IDs
These devices are essentially the same as the E54 series with the exception of immutable boot (SG41, SG61) and HSM (SG60, SG61), and some bug fixes found only in E54 revision F. When the security features are not enabled, they behave identically except for the different DIDs. Signed-off-by: Matt Trescott <[email protected]> Change-Id: Ic93313f3e20af0ed4a5768880d17b335a7b7bb04 Reviewed-on: https://review.openocd.org/c/openocd/+/8355 Tested-by: jenkins Reviewed-by: Tomas Vanek <[email protected]>
1 parent ad21613 commit 1173473

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/flash/nor/atsame5.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@
8585
#define SAME_SERIES_51 0x01
8686
#define SAME_SERIES_53 0x03
8787
#define SAME_SERIES_54 0x04
88+
#define PIC32CXSG_SERIES_41 0x07
89+
#define PIC32CXSG_SERIES_60 0x00
90+
#define PIC32CXSG_SERIES_61 0x02
8891

8992
/* Device ID macros */
9093
#define SAMD_GET_PROCESSOR(id) (id >> 28)
@@ -148,6 +151,27 @@ static const struct samd_part same54_parts[] = {
148151
{ 0x03, "SAME54N19A", 512, 192 },
149152
};
150153

154+
/* See PIC32CX SG41/SG60/SG61 Family Silicon Errata and Datasheet Clarifications
155+
* DS80000985G */
156+
/* Known PIC32CX-SG41 parts. */
157+
static const struct samd_part pic32cxsg41_parts[] = {
158+
{ 0x00, "PIC32CX1025SG41128", 1024, 256 },
159+
{ 0x01, "PIC32CX1025SG41100", 1024, 256 },
160+
{ 0x02, "PIC32CX1025SG41064", 1024, 256 },
161+
};
162+
163+
/* Known PIC32CX-SG60 parts. */
164+
static const struct samd_part pic32cxsg60_parts[] = {
165+
{ 0x00, "PIC32CX1025SG60128", 1024, 256 },
166+
{ 0x01, "PIC32CX1025SG60100", 1024, 256 },
167+
};
168+
169+
/* Known PIC32CX-SG61 parts. */
170+
static const struct samd_part pic32cxsg61_parts[] = {
171+
{ 0x00, "PIC32CX1025SG61128", 1024, 256 },
172+
{ 0x01, "PIC32CX1025SG61100", 1024, 256 },
173+
};
174+
151175
/* Each family of parts contains a parts table in the DEVSEL field of DID. The
152176
* processor ID, family ID, and series ID are used to determine which exact
153177
* family this is and then we can use the corresponding table. */
@@ -169,6 +193,12 @@ static const struct samd_family samd_families[] = {
169193
same53_parts, ARRAY_SIZE(same53_parts) },
170194
{ SAMD_PROCESSOR_M4, SAMD_FAMILY_E, SAME_SERIES_54,
171195
same54_parts, ARRAY_SIZE(same54_parts) },
196+
{ SAMD_PROCESSOR_M4, SAMD_FAMILY_E, PIC32CXSG_SERIES_41,
197+
pic32cxsg41_parts, ARRAY_SIZE(pic32cxsg41_parts) },
198+
{ SAMD_PROCESSOR_M4, SAMD_FAMILY_E, PIC32CXSG_SERIES_60,
199+
pic32cxsg60_parts, ARRAY_SIZE(pic32cxsg60_parts) },
200+
{ SAMD_PROCESSOR_M4, SAMD_FAMILY_E, PIC32CXSG_SERIES_61,
201+
pic32cxsg61_parts, ARRAY_SIZE(pic32cxsg61_parts) },
172202
};
173203

174204
struct samd_info {

0 commit comments

Comments
 (0)