Psii 0 Posted March 14, 2013 Share Posted March 14, 2013 As the title suggests, I intend to program an MSP430F2012 interfaced with a current sensing IC and some other peripherals (ADC, DC-DC converter etc.) on a custom PCB. I am new to TI microcontrollers, and I am unsure on how to program it. From the schematics, the device uses SBW two-wire to program via the TEST and RST pins. I have been looking at the Olimex v2 JTAG TINY programmer and debugger as an option. Will this be a sufficient hardware interface? For the PC software I thought about using IAR kickstarter as I do not need more than 4kB, and Olimex MSP430 programmer software. Will this suffice? Am I missing something? Best regards Quote Link to post Share on other sites
roadrunner84 466 Posted March 14, 2013 Share Posted March 14, 2013 I don't know the olimex programmer, but you must use a specific sbw programmer if your device onlysupports sbw. Some chips support both sbw and jtag, but I don't think the f2012 supports jtag. If you buy a launchpad which go for only $10.- you can also program the f2012 directly from iar. Quote Link to post Share on other sites
Psii 0 Posted March 14, 2013 Author Share Posted March 14, 2013 Thank you for your reply. Programming directly from IAR seems convenient. From the datasheet, the F2012 looks to be JTAG compatible. Could you link me that lauchpad, pherhaps? And, the MSP430 is soldered to the PCB, so I can't remove it and insert into a HW dev kit. Quote Link to post Share on other sites
roadrunner84 466 Posted March 14, 2013 Share Posted March 14, 2013 No problem with the pcb. The sbw interface is only a few wires. The launchpad can be ordered directly from ti.com. Just browse to mcu, msp430,development kits. sbw is essentially a multiplexed version of jtag, so even if it states to be jtag, make sure it supports the 4 wire version. Quote Link to post Share on other sites
Fred 453 Posted March 14, 2013 Share Posted March 14, 2013 It might be tricky programming the F2012 in place on the PCB. If you've got a link to the device that'd make it easier to help you. (If it's a custom board that you're designing it should be easy to make it so you can program it in place.) The MSP430 launchpad is definitely up to the job of programming and debugging a F2012 and is much cheaper than any JTAG option, If you're playing around you can get a F2012IN DIP version that will fit on the Launchpad too. Quote Link to post Share on other sites
Psii 0 Posted March 14, 2013 Author Share Posted March 14, 2013 I think I am going with the LaunchPad then. It seems like the best option, and is fairly well documented. I will also buy a couple of DIP packages of the F2012 to experiment on in a breadboard setup. Is it a problem that it needs to be programmed through 2-wire? I made a quick schematic of the MCU in the circuit Quote Link to post Share on other sites
roadrunner84 466 Posted March 14, 2013 Share Posted March 14, 2013 Looking good, but if you want it to run stand alone, you must add a (47k) resistor from rst to vcc. Quote Link to post Share on other sites
chibiace 46 Posted March 14, 2013 Share Posted March 14, 2013 if you run seperate vcc make sure to connect the gnds. you will probably need to move the chip from the launchpad if your programming an external circuit. if you want to program an external device which is powered by a battery you only need to program using the gnd, test, rst pins as the battery provides vcc Quote Link to post Share on other sites
kenyee 5 Posted March 14, 2013 Share Posted March 14, 2013 And why aren't you getting help from the person who designed the custom board? Does the custom board have pinouts to get to the SBW pins in your picture? Or does it use the tag-connect footprint? Or does it use a JTAG header? If you have a tag-connect footprint, the Olimex JTAG adapters have pinouts different from TI's UIF-FET debugger. Quote Link to post Share on other sites
Psii 0 Posted March 15, 2013 Author Share Posted March 15, 2013 Looking good, but if you want it to run stand alone, you must add a (47k) resistor from rst to vcc. This is to pull it low (inverted high) to set it in prog mode? if you want to program an external device which is powered by a battery you only need to program using the gnd, test, rst pins as the battery provides vcc Vcc is provided by battery, that is correct. And why aren't you getting help from the person who designed the custom board? Does the custom board have pinouts to get to the SBW pins in your picture? Or does it use the tag-connect footprint? Or does it use a JTAG header? If you have a tag-connect footprint, the Olimex JTAG adapters have pinouts different from TI's UIF-FET debugger. There are several companies involved, and I am brought in because of some disagreements between some of them. So I basically have to figure it all out. I am not sure what you mean about "tag-connect footprint". The JXXX header is the port I need to program via. These two pins will also be used for TX and RX while in operational mode. Quote Link to post Share on other sites
roadrunner84 466 Posted March 15, 2013 Share Posted March 15, 2013 tag-connect is a proprietary system for connecting programmers in a small footprint. I doubt very much you're using them. You're probably using either a standard 2x10 pin 0.1" pitch JTAG connector or the 1x4 or 1x6 pin 0.05" ez430 connector. If there is still a connector to choose, I'd suggest the ez430 connector (not assembled, but the holes are available on the launchpad. with the usb plug facing away from you the connector is on the right side of the board on top of the dashed line) If you flash the firmware in the microcontroller, either disconnect the battery while the connector is plugged in or disconnect the vcc pin in the programmer (cable). A third option is to have some voltage regulation circuit taking care of it, but that's more complex. The 47k resistor is needed to prevent it from staying in reset mode when running stand alone. The programmer can still pull the reset low when required. Quote Link to post Share on other sites
Psii 0 Posted March 15, 2013 Author Share Posted March 15, 2013 There is a connector mounted. It is 1x6 pin female connector with very small dimensions for the wires (<1 mm hole diameter and < 0,5 mm between each hole. The length of the header is about 8 mm). I was thinking of just using individual wires and stick them into a 2x10 connector or something, but I guess there is a point to minimizing the distances. And I guess I need some intermediate interconnection for the 47k resistor. I cannot find an 1x6 ez430 connector when I google it though. Quote Link to post Share on other sites
Fred 453 Posted March 15, 2013 Share Posted March 15, 2013 That small connector does sound like the one on the EZ430. This is a small USB stick which does more or less the same thing as the Launchpad. It comes with a tiny F2013IPW detachable target board and you can buy extra F2012IPW target boards for it. I suspect the original board designer used this as their starting point. EZ430 programmer and F2013 board https://estore.ti.com/EZ430-F2013-MSP430-USB-Stick-Development-Tool-P800.aspx Extra F2012 target boards https://estore.ti.com/EZ430-T2012-MSP430-USB-Stick-F2012-Board-P955.aspx If you need to make up a connector it's just a fairly standard 0.05" pitch header. Quote Link to post Share on other sites
roadrunner84 466 Posted March 15, 2013 Share Posted March 15, 2013 Yeah, that will most probably be the ez430. Holes < 1mm and 0.5mm apart means probably that the holes are 0.05" apart (1.27mm) from center to center. You can either use the ez430 stick or the MSP430 launchpad. In the second case you'd need to solder a 1x6 pin angled male header on the launchpad, since it's not shipped with it. Make sure you plug it in the right way, if you put it on upside down you might fry your circuit. Quote Link to post Share on other sites
Psii 0 Posted March 15, 2013 Author Share Posted March 15, 2013 Alright, that confirms it. I think I will order both the launchpad and ez430 stick with a F2012 target board, since the latter seems to have 10-20 days of shipping time in my coutnry and I want to start developing as soon as possible. I can use the launchpad with the DIPs and wait for the ez430 to arrive in order to program the MCU in-circuit. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.