4 * This file is part of BeRTOS.
6 * Bertos is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 * As a special exception, you may use this file as part of a free software
21 * library without restriction. Specifically, if other files instantiate
22 * templates or use macros or inline functions from this file, or you compile
23 * this file and link it with other files to produce an executable, this
24 * file does not by itself cause the resulting executable to be covered by
25 * the GNU General Public License. This exception does not however
26 * invalidate any other reasons why the executable file might be covered by
27 * the GNU General Public License.
29 * Copyright 2011 Develer S.r.l. (http://www.develer.com/)
33 * \brief CHIP ID SAM3 definitions.
36 #include "sam3_chipid.h"
38 #include <cpu/types.h>
40 static const char _unknown[] = "unknown";
41 static const char * const chip_id_eproc_names[] =
52 const char *chipid_eproc_name(int idx)
55 return chip_id_eproc_names[idx];
60 #define chip_id_nvpsize2 chip_id_nvpsize // these two tables are identical
61 static const char * const chip_id_nvpsize[] =
81 const char *chipid_nvpsize(int idx)
84 return chip_id_nvpsize[idx];
90 static const char * const chip_id_sramsize[] =
111 const char *chipid_sramsize(int idx)
114 return chip_id_sramsize[idx];
120 static const struct archnames { unsigned value; const char *name; } chip_id_archnames[] =
122 { 0x19, "AT91SAM9xx Series" },
123 { 0x29, "AT91SAM9XExx Series" },
124 { 0x34, "AT91x34 Series" },
125 { 0x37, "CAP7 Series" },
126 { 0x39, "CAP9 Series" },
127 { 0x3B, "CAP11 Series" },
128 { 0x40, "AT91x40 Series" },
129 { 0x42, "AT91x42 Series" },
130 { 0x55, "AT91x55 Series" },
131 { 0x60, "AT91SAM7Axx Series" },
132 { 0x61, "AT91SAM7AQxx Series" },
133 { 0x63, "AT91x63 Series" },
134 { 0x70, "AT91SAM7Sxx Series" },
135 { 0x71, "AT91SAM7XCxx Series" },
136 { 0x72, "AT91SAM7SExx Series" },
137 { 0x73, "AT91SAM7Lxx Series" },
138 { 0x75, "AT91SAM7Xxx Series" },
139 { 0x76, "AT91SAM7SLxx Series" },
140 { 0x80, "ATSAM3UxC Series (100-pin version)" },
141 { 0x81, "ATSAM3UxE Series (144-pin version)" },
142 { 0x83, "ATSAM3AxC Series (100-pin version)" },
143 { 0x84, "ATSAM3XxC Series (100-pin version)" },
144 { 0x85, "ATSAM3XxE Series (144-pin version)" },
145 { 0x86, "ATSAM3XxG Series (208/217-pin version)" },
146 { 0x88, "ATSAM3SxA Series (48-pin version)" },
147 { 0x89, "ATSAM3SxB Series (64-pin version)" },
148 { 0x8A, "ATSAM3SxC Series (100-pin version)" },
149 { 0x92, "AT91x92 Series" },
150 { 0x95, "ATSAM3NxC Series (100-pin version)" },
151 { 0xF0, "AT75Cxx Series" },
156 const char *chipid_archnames(unsigned value)
158 for (int i = 0; chip_id_archnames[i].name; i++)
160 if (chip_id_archnames[i].value == value)
161 return chip_id_archnames[i].name;
167 static const char * const chip_id_nvptype[] = {
169 "romless or onchip flash", // 1
170 "embedded flash memory", // 2
171 "rom(nvpsiz) + embedded flash (nvpsiz2)", //3
172 "sram emulating flash", // 4
175 const char *chipid_nvptype(int idx)
178 return chip_id_nvptype[idx];