This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Error connecting to the target - programming error

Other Parts Discussed in Thread: MSP430F4152

The most frequent problem we run into programming boards is they have the error: 

MSP430: Error connecting to the target: Unknown device

We haven't been able to trace this error - some boards program fine, some will never program, others will program sporadically.  We use the Spy-Bi-Wire on our board with a 47kohm 1% pullup to Vcc and a 2.2nF 10% capacitor to ground, like it says in the app note.  

Do the resistor and capacitor need to be close the the input pin on the MCU?  Has anyone else run into this repeatedly?  

  • I think I may have answered part of my own question - in the MSP-FET430 Flash Emulation Tool User's Guide, it says "The upper limit for C1 is 2.2nF..."  It seems that the 2.2nF is too high - I removed it from some of the boards in question and they work now.  Should a capacitor be placed between SBWTDIO and ground?  A value lower than 2.2nF?  

  • Problem is the double usage of that pin. One is as reset control. Here more is more. To ensure a proper device startup on slow rising VCC, a pullup resistor and a large capacitor are required (10 or even 100nF won't hurt).

    But if the SBW protocol is used for programming/debugging, RST is also used for the SBW transfer clock (or was it the dat aline?). Here the capacitor will limit the signal frequency and less is better.

    An idea that came up lately is to connect the SBW signal directly to RST, and the pullup resistor/pulldown capactor with a series resistor. So if SBW is connected, the filter won't affect the signal, while if there is no SBW, the sereis resistor doesn't coutn at all.

  • We're using it as a programming line (no hardware reset).  It looks like we suffer no ill effects for taking out the capacitor, so we'll probably leave it out on future designs.  

  • On the 5172, you cannot disable the reset pin completely (don't know about your device). It's either reset or NMI. Leaving it without capacitor might make it susceptible to spikes (EMC testing, 8kV discharge on some nearby part), particularly with long programming lines (going to a connector) as antenna.

    I've had similar problelms. Leaving out the 2.2nF helps, but is probably not the final solution. The series resistor connection helps with the reset function, but not with ESD decoupling. Maybe a smaller capacitor still works for debugging, but could get rid of fast transients. Watch signal integrity, use short cables, don't use the 330 ohms series resistor as described in the hardware tools user guide.

  • BuffaloEngineer said:
    We're using it as a programming line (no hardware reset).

    It's not a quesiton of whether you want to apply a manual reset.
    The reset pin is sometimes required to support proper device startup.

    Without an r/c combo, the MSP won't start properly if VCC is slowly rising. It is no problem if the MSP is battery-powered (battery voltage is mroe or less instantaneous) or by an old-style transformer/linear regulator setup. But with modern switchign supplies, the output voltage only rises slowly. And the cheaper ones don't have a gating function that keeps the output off until the output voltage is reached. So sometimes the MSP starts before voltage is high enough (or the voltage even drops a bit when the MSP starts drawig current) and crashes. If (as it is done on almost every program, even if I wouldn't recommend it) the watchdog is disabled, then the MSP won't ever be revived except by a manual reset. The external R/C combo provides a 'manual' reset during power-up, ensuring that the MSP doesn't start before VCC is stable.

    Alternatively, a 'power good' signal from the supply can be used (if available) to keep the MSP in reset state until power is good.

    The MSPs internal BOR circuit (which older MSPs do not have at all) cannot deal with slowly rising VCC in all cases.

  • We are using a battery, but I'd like to take the safest path.  I'll experiment with lower value capacitors, but our board is already made, so it's too late to put in a series resistor.  For future reference, what value resistor do you use?  Should the 47kohm pullup be split into two 22kohm resistors (1 for pullup, 1 for series)?  

    Is there a minimum recommended capacitance?  Thanks very much for the advice so far!

    We're using the MSP430F4152. 

  • Also, the family users guide states RST pin... "All devices except the MSP430F543x (non-A devices) have the internal pullup enabled. In
    this case, no external pullup resistor is required." so splitting the pullup resistor might not work, you get a divider between internal pullup and first half of split resistor. Maybe a split like 1k/47k could work, with an additional xxx pF directly on the RST pin for ESD protection?

  • There is no capacitor needed for ESD.

    The main culprit is the capacitor to GND which slows down the edges of the SBW clock signal. Any resistor between RST pin and capacitor will be better than a direct (0 Ohm) connection. However, if it is too large, this will raise the RST pin during power-up, which is counterproductive.
    If the internal pullup is enabled (all but the 54xx non-A), a 47nF capacitor and a 1k in series should do the trick, but that's just a rough estimation.

    You can try to calculate the attenuation of 1k/47nF on 6MHz. TI recommends a maximum capacitance of 2.2nF if SBW is used, but this is with a < 0.1Ohm resistor (plain wire resistance). A rough estimation shows that with a 1k series resistor, the capacitor can be >10.000 times as large, which gives 22µF, for the same (acceptable) attenuation.

**Attention** This is a public forum