Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit 087f30f

Browse files
committed
mspm0: Expand the id list of supported mspm0 targets
1 parent 267acf8 commit 087f30f

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

src/target/mspm0.c

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626

2727
#define MSPM0_CONFIG_FLASH_DUMP_SUPPORT (CONFIG_BMDA == 1 || ENABLE_DEBUG == 1)
2828

29-
#define TI_DEVID_MSPM0C 0xbba1U /* MSPM0C110[34] */
30-
#define TI_DEVID_MSPM0L 0xbb82U /* MSPM0L110[56], MSPM0L13[04][456] */
31-
#define TI_DEVID_MSPM0L_1227_2228 0xbb9fU /* MSPM0L[12]22[78]*/
32-
#define TI_DEVID_MSPM0G 0xbb88U /* MSPM0G310[567], MSPM0G150[567], MSPM0G350[567] */
33-
3429
#define MSPM0_SRAM_BASE 0x20000000U
3530
#define MSPM0_FLASH_MAIN 0x00000000U
3631
#define MSPM0_FLASH_NONMAIN 0x41c00000U /* One Sector, BANK0. Device boot configuration (BCR, BSL) */
@@ -193,6 +188,19 @@ static bool mspm0_dump_bcr_config(target_s *const target, const int argc, const
193188
}
194189
#endif
195190

191+
static uint16_t g_mspm0_partnums[] = {
192+
0xbba1U, /* MSPM0C: 1103 1104 1103-Q1 1104-Q1 */
193+
0x0bbbU, /* MSPM0C: 1105-Q1 1106-Q1 */
194+
0xbbbaU, /* MSPM0C: 1105 1106 */
195+
0xbb82U, /* MSPM0L: 1105 1106 1304 1305 1305 1344 1345 1346 1345-Q1 1346-Q1 */
196+
0xbb9fU, /* MSPM0L: 1227 1228 2227 2228 1227-Q1 1228-Q1 2227-Q1 2228-Q1 */
197+
0xbbb4U, /* MSPM0L: 1116 1117 1116-Q1 1117-Q1 */
198+
0xbbc7U, /* MSPM0L: 1126 1127 2116 2117 */
199+
0x0bbaU, /* MSPM0H: 3215 3216 */
200+
0xbb88U, /* MSPM0G: 1105 1106 1107 1505 1506 1507 3105 3106 3107 3505 3506 3507 3105-Q1 3106-Q1 3107-Q1 3505-Q1 3506-Q1 3507-Q1 */
201+
0xbba9U, /* MSPM0G: 1518 1519 3518 3519 3518-Q1 3519-Q1 3529-Q1 */
202+
};
203+
196204
static void mspm0_add_flash(
197205
target_s *const target, const uint32_t base, const size_t length, const uint32_t banks, uint32_t sram_size)
198206
{
@@ -233,10 +241,12 @@ bool mspm0_probe(target_s *const target)
233241
return false;
234242

235243
const uint32_t partnum = (deviceid & MSPM0_DEVICEID_PARTNUM_MASK) >> MSPM0_DEVICEID_PARTNUM_SHIFT;
236-
if (partnum != TI_DEVID_MSPM0C && partnum != TI_DEVID_MSPM0L && partnum != TI_DEVID_MSPM0L_1227_2228 &&
237-
partnum != TI_DEVID_MSPM0G)
238-
return false;
244+
for (size_t i = 0; i < ARRAY_LENGTH(g_mspm0_partnums); ++i)
245+
if (partnum == g_mspm0_partnums[i])
246+
goto id_matched;
247+
return false;
239248

249+
id_matched:
240250
target->driver = "MSPM0";
241251
target->target_options |= TOPT_INHIBIT_NRST;
242252
target->mass_erase = mspm0_mass_erase;

0 commit comments

Comments
 (0)