From 166a99f2ab5868e10c031cb6dca440bcd2585f06 Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Tue, 18 Nov 2014 12:53:26 +1300 Subject: [PATCH] fet_olimex_db: add support for MSP430G2955. Adapted from an older patch from Paul Haddad . --- drivers/devicelist.c | 3 ++- drivers/devicelist.h | 3 ++- drivers/fet_olimex_db.c | 29 +++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/drivers/devicelist.c b/drivers/devicelist.c index 057689d..000033d 100644 --- a/drivers/devicelist.c +++ b/drivers/devicelist.c @@ -19,7 +19,7 @@ #include "devicelist.h" -const struct device_table sdeviceID[289] = +const struct device_table sdeviceID[290] = { /* Fuse parameter is set without lock bit * 0x0 0x1 0x2 0x3 0x8 0x9 0xD Fuse Fuse DeviceTypeID Device String @@ -313,6 +313,7 @@ const struct device_table sdeviceID[289] = {{0x42, 0x81, -1 , -1 , -1 , -1 , -1 , -1 , -1 }, DT_MSP430F5229, "MSP430F5214"}, // MSP430F5529 {{0x41, 0x81, -1 , -1 , -1 , -1 , -1 , -1 , -1 }, DT_MSP430F5229, "MSP430F5213"}, // MSP430F5529 {{0x40, 0x81, -1 , -1 , -1 , -1 , -1 , -1 , -1 }, DT_MSP430F5229, "MSP430F5212"}, // MSP430F5529 + {{0x29, 0x55, -1 , -1 , -1 , -1 , -1 , -1 , -1 }, DT_MSP430G2955, "MSP430G2955"}, // end of device table default return value {{ 0 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, DT_END, "End_of_devices"}, //End of devices }; diff --git a/drivers/devicelist.h b/drivers/devicelist.h index aa54321..2f3c8d7 100644 --- a/drivers/devicelist.h +++ b/drivers/devicelist.h @@ -309,10 +309,11 @@ typedef enum { DT_MSP430F5214, DT_MSP430F5213, DT_MSP430F5212, + DT_MSP430G2955, DT_END } devicetype_t; /* Mapping between device types and identification bytes. */ -extern const struct device_table sdeviceID[289]; +extern const struct device_table sdeviceID[290]; #endif diff --git a/drivers/fet_olimex_db.c b/drivers/fet_olimex_db.c index 9b50137..a60c841 100644 --- a/drivers/fet_olimex_db.c +++ b/drivers/fet_olimex_db.c @@ -7950,6 +7950,35 @@ static const struct fet_olimex_db_record fet_olimex_db[] = { 0x00, 0x00, }, }, + [DT_MSP430G2955] = { /* Copied from MSP430G2453, with modifications */ + .name = "MSP430G2955", + .msg29_params = {0x00, 0x39, 0x31}, + .msg29_data = { /* Copied from MSP430G2453, with changes */ + 0x00, 0x21, 0xff, 0xff, 0x00, 0x00, 0x00, 0x10, + 0xff, 0x10, 0x00, 0x01, 0x00, 0x11, 0xff, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, + 0x01, 0x00, 0xd7, 0x60, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x07, 0x10, 0x0e, 0xc4, 0x09, 0x70, 0x17, + 0x58, 0x1b, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x33, 0x0f, 0x1f, 0x0f, + 0xff, 0xff + }, + .msg2b_len = 0x4a, + .msg2b_data = { /* Copied from MSP430G2452 */ + 0x00, 0x0c, 0xff, 0x0f, 0x00, 0x02, 0x02, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00 + } + }, [DT_END] = { .name = "End_of_devices", .msg29_params = {0x00, 0x120, 0x118},