SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on how to get your MSP JTAG programmer up and running.
By cszym001
#49932
Hi,

After a lot of practice with 2012, 13's and 2131's I am trying to program my MSP430F2122 but I am haveing a hard time. I have a ez430 USB stick that came with a 2013 micro and I figured that would be able to program it but I can't seem to get it to work. I figured it is programmable using SPI-BI-Wire is it? I have Vcc going to pin 2 Gnd to pin 4 and my RST pulled up through 47k and Test (pins 7 and 1 respectively) tied to the ez430 but when I run IAR it says failed to initialize device. How do I program this thing?

Thanks Chris
User avatar
By leon_heller
#49961
The data sheet doesn't say that it is Bi-wire programmable. You will need a FET or something similar to program/debug it.

Leon
By actionplus
#50075
I am haivng the same problem.
But I am using the FET on my chip. It gets the same error.
I am using the FET to supply the power for the chip.
By OldCow
#50121
I agree with Leon.

F21xx chips do not have SBW and cannot be programmed by eZ430 Tool.
By oopscope
#115793
Actually, it works fine with some adjustments...

1. Bring the VCC, VSS, TEST and RST to a 4 pin header.
2. Wire a short jumper to connect to the eZ430-F2013 header. An easy way to do this is to remove the MSP430F2013 from the test board, then solder your 4 wire jumper to the 14 pin header. Here are the connections:

4pin ez430F2013 eZ430-F2013
_______ header 14 Pin Header 4Pin connector (looking from the top)
VSS |4-----4< <-----------P14-----------4<
RST |7-----3< <-----------P10-----------3<
TEST|1-----2< <-----------P11-----------2<
VCC |2-----1< <-----------P1------------1<

OR direct to the mating connector: Digikey part# S9008E-04-ND

1. The chip reports itself as a 2111 and asks if you want to download anyway not sure why... just confirm through it. You can run the chip like this but you cannot link with the full memory.
2. Linking with the lnk430F2122.xcl file seems to result in a hangup when trying to single step or run. I faked it out by applying the 2122 memory mapping settings to the 2112 link file and then specifying the MSP430F2112 in the compiler. All seems to work after that.
3. I bought the MSP-FET430UIF in case there are issues but have not had to resort to this yet.

Here is the new lnk430F2112.xcl
//
// XLINK configuration file for MSP430F2112
//
// Copyright 1996-2010 IAR Systems AB
//
// $Revision: $
//
// ************************************************

// ---------------------------------------------------------
// Description
//

//
// Usage:
//
// xlink [file file ...] -f lnk430f2112.xcl
//
// -----------------------------------------------
// Device summary
//

//
// Core: MSP430
//
// Interrupt vectors: 16
//
// Peripheral units: 0-01FF
//
// Information memory (FLASH): 1000-10FF
//
// Read/write memory (RAM): 0200-03FF
//
// Read-only memory (FLASH): F000-FFFF
//


// -----------------------------------------------
// Segments
//

// -------------------------------------
// Data read/write segments (RAM)
//

//
// segment Usage
// ------- --------------------------
// DATA16_Z Data initialized to zero
// DATA16_I Data initialized by copying from DATA16_ID
// DATA16_N Data defined using __no_init
// DATA16_HEAP The heap used by 'malloc' and 'free'
// CSTACK Runtime stack
//


// -------------------------------------
// Program and data read-only segments (FLASH)
//

//
// segment Usage
// ------- --------------------------
// DATA16_C Constant data, including string literals
// DATA16_ID initializers for DATA<nn>_I
// INFO Information memory
// INFOA Information memory, bank A
// INFOB Information memory, bank B
// INFOC Information memory, bank C
// INFOD Information memory, bank D
// CSTART Program startup code
// CODE Program code
// ISR_CODE Program code for interrupt service routines
// DIFUNCT Dynamic initialization vector used by C++
// CHECKSUM Checksum byte(s) generated by the -J option
// INTVEC Interrupt vectors
// RESET The reset vector
//
// Notes:
//
// * The INFOx and INFO segments overlap, this allows data either to be
// placed in a specific bank or anywhere in the info memory.
//
// * The INTVEC and RESET segments overlap. This allows an application to
// either use the reset vector provided by the runtime library, or
// provide a reset function by defining an interrupt function associated
// with the reset vector.
//


// ---------------------------------------------------------
// Configuation
//

// -----------------------------------------------
// Stack and heap sizes
//

// Uncomment for command line use
//-D_STACK_SIZE=80
//-D_DATA16_HEAP_SIZE=80


// -----------------------------------------------
// Define cpu
//

-cmsp430


// -----------------------------------------------
// Support for placing functions in read/write memory
//

-QCODE_I=CODE_ID


// ---------------------------------------------------------
// Placement directives
//

// -----------------------------------------------
// Read/write memory
//

-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,DATA16_HEAP+_DATA16_HEAP_SIZE=0200-03FF
-Z(DATA)CODE_I
-Z(DATA)CSTACK+_STACK_SIZE#


// -----------------------------------------------
// Read-only memory
//

// -------------------------------------
// Information memory
//

-Z(CONST)INFO=1000-10FF
-Z(CONST)INFOA=10C0-10FF
-Z(CONST)INFOB=1080-10BF
-Z(CONST)INFOC=1040-107F
-Z(CONST)INFOD=1000-103F



// -------------------------------------
// Constant data
//

-Z(CONST)DATA16_C,DATA16_ID,DIFUNCT,CHECKSUM=F000-FFDF


// -------------------------------------
// Code
//

-Z(CODE)CSTART,ISR_CODE,CODE_ID=F000-FFDF
-P(CODE)CODE=F000-FFDF


// -------------------------------------
// Interrupt vectors
//

-Z(CODE)INTVEC=FFE0-FFFF
-Z(CODE)RESET=FFFE-FFFF