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.

MSPM0C1104: Trouble programming MSPM0 using Launch pad

Part Number: MSPM0C1104
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

I'm using this device in the 8 pin format and having trouble using the Launch pad as a programmer. I have made my own PCB with some local decoupling, and am trying to program by taking VSS, VDD, SWD, SWD & nRST across to the chip. I continuously get

"CS_DAP_0: Error connecting to the target:  DAP Connection Error. This could be caused by the device having gone to low power mode. Try forcing an external reset.If the error persists, try forcing BSL, a Mass erase or a Factory Reset. Check device FAQs for more information. ", but when I monitor the device using scope probes, it programs and runs just fine.

This leads me to believe that SWD/SWC need pullups, but they are not in the schematic of the Launch pad, which programs the on-board 20 pin chip just fine too. the cables are only about 6" long to my target PCB, the programming just seems a bit flaky. Any insights?

Using CCS  20.1.1.8__1.7.1

  • Hi Simon,
    I recommend updating your SDK and SYSCONFIG to the latest version (to remove any possibility of software error). The SWDIO needs a pull-up resistor connected to DVCC, and the SWCLK needs a pull-down resistor connected to the ground, as indicated in the MSPM0 C-Series MCU Hardware Development Guide Section 5.1 Debug Port Pins and Pinout. However, these two are, by default, connected to both resistors inside the M0C device. Normally, you wouldn't need an external resistor to "improve" its performance. Have you enabled your project's SWDIO and SWCLK debug options in SYSCONFIG? If so, can you probe the SWDIO and SWCLK lines to see if any signal is coming from them? Also, can you take a picture of the pins you use to share the VSS, VDD, SWDIO, SWCLK, and nRST signals?
    Best Regards,
    Diego Abad

  • The lines show activity, nRST operates, then SWD/SWC operate shortly afterwards, and Debug enable on SWD pins is checked.

    nRST is pin 2/PA1, SWC pin 7/PA20, SWD pin 6/PA19. VDD pin 4, VSS pin 3.

    It's the pull-up and pull down resistors that's worrying me - they show as connected internally in the datasheet, but the fact that applying the scope probes improves things and allows programming makes me wonder?

    I'm new to CC Studio (moving from 8 bit PICs / MPLABx), so appreciate your help.

  • Hi Simon,
    Everything seems fine in regards of the Debug pins refer. Maybe you could be correct on the pull-up & pull-down ideas. I think it's worth adding them in your board and see if this makes the connection stronger. In the meantime, could you share a picture of how are you connecting the XDS110 pins from the launchpad into your board?

    Best Regards,

    Diego Abad

  • I’m using the Launchpad, and using the nRST pull-up/cap on the board (green wire). My own board is the same pinout as the SOP device, has a local decoupling cap and an LED for power indication (I’ll put the nRST stuff on it in the next revision!) I can add the resistors to my board and try, that’s the next thing to do, probably over this coming weekend.

  • Hi Simon,

    Thanks for sharing it. I  have a couple follow up questions for your custome PCB:
    1. Did you have the VCAP and Decoupling cap for VDD and VSS? This could be affecting how the MCU operates

    2. What is the value for the capacitor attached to reset (which should be a pull-down capacitor)? 
    3.  Is the resistor in your board attached to nRST? What is its value?

    Best Regards,

    Diego Abad

  • 1) it's using the supply from the Launchpad, and there's a 0.1uF decoupler on my PCB.

    2) I'm using the nRST on the launchpad - so 47K and 10nF.

    3) the resistor on my board is just a series resistor for an LED across VSS/VDD.

  • Hi Simon,
    It seems you are following all of the recommended requirements for your schematics design. The VCAP it's one thing that should be present since it gives the M0 a stable source of power. Let me know if the pull-ups resistors help out. 

    Best Regards,

    Diego Abad 

  • Hi Simon,
    Did the pull-ups helped?

    Best Regards,

    Diego Abad

  • They did. It's like they are not in the chip.

  • Hi Simon,
    Just to verify, did you add a pull-up to SWDIO and a pull-down resistor to SWCLK? Or pull-ups to both SWDIO and SWCLK? What is the resistor value you use?
    Best Regards,
    Diego Abad

  • The pull-up and pull down, 4K7. I've queried this with TI and am making further investigations. I'm making a new development PCB with these on.

  • Hi Simon,
    Thanks for letting me know. I'll also inquiry about this with my team as well.

    Best Regards,

    Diego Abad

  • Hi Simon,
    After talking with my team, one instance where you will need the external pull-ups/downs is if the XDS connection is weak.

    Best Regards,

    Diego Abad 

  • That must have been it. Got my new boards, and it's all good. Local decoupling and a local reset too. Didn't need the pull-ups/downs on this one (but allowed for them on the back of the board).