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.

MSP432E401Y: Cannot re-program micro after program one time on custom board. JTAG

Part Number: MSP432E401Y
Other Parts Discussed in Thread: SEGGER

Hello,

We are devolving a small board using an MSP432E401Y witch does not have any external crystal nor oscillator. Does have the circuitry we think necessary, but not in place.

We have available 2 programmers:
 - SEGGER Flasher ARM
 - XDS110 USB

I've successfully used the Launchpad XDS110USB as a programmer for our board, but after one specific programmer I lost all ability to reprogram the board, the CCS always gives this error:

Error connecting to the target:
(Error -1170 @ 0x0)
Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
(Emulation package 8.3.0.00003)

After further analysis I discover I'd use a code witch is initializing and external oscillator (an old code from the launchpad tests), but is it reason for not getting able to program any more? I'm uisng JTAG or at leas I think.

Every thing was fine with this initialization:


g_ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_OSC_INT |
    SYSCTL_USE_PLL |
    SYSCTL_CFG_VCO_480),120000000);

After this initialization lost ability to program the micro.

g_ui32SysClock = MAP_SysCtlClockFreqSet(
     (SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN |
     SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480),
     SYSCLOCK);

Is there any way to revert this? or perform any reset somehow?

I know this is not for this specific problem, but I've already tried the procedure JTAG-to-SWD - SWD-to-JTAG 10times but got no where.

If more information/schematics are needed, just ask, I can right it down.

Thank you.

  • Hi Andre,

    based on your description it seems to me the MSP device has been programmed with a code requiring an external crystal, but you do not apply this crystal in the HW design. This means the device has no clock, after initializing the device after reset.

    The missing clock is probably the root cause of not being able to synchronize the JTAG communication with the XDS110 debugger. This would be probably the same with any debugger. The only theoretical chance might be, managing to synchronize JTAG, before the device switches to the external clock source. As this is probably a very short time window, you might never manage to achieve this. Only a delay of the code execution would potentially make this possible. The only possible way to delay code execution would be resetting the MSP. Now every device reset again brakes the JTAG synchronization.

    You can probably sense where this leads to, a deadlock situation.

    I think the biggest chance to save the device and regain access is apply a crystal, as set in the code (could be the selected or lower frequency crystal) or to use a Bootstrap Loader access to erase the code in the device. But the Bootstrap Loader approach requires Bootstrap Loader HW. Thus I think the approach with the crystal is the one with least effort.

    Best regards

    Peter

  • My thoughts exactly, my assumptions was correct. It is indeed an extremely hard situation to deal with.
    I actually thought there was some mechanism on the MCU that would allow it to revert to PIOSC when no MOSC was detected independently to what was programmed.

    Can I, for any chance, grab the oscillator signal from the launchpad I have and feed it to my micro OSC0 signal and try to have it clocking the MCU on my board?

    We also tried to use an external crystal of 25Mhz but got no where also. Maybe you can help me if we are making some mistake:


    Thank you for your quick response.

  • Hi Andre,

    you could try using any toggling signal, applied to oscillator input. Please use a serial resistor or predivider in case it is a signal of logic amplitude. Serial resistance >10k, to avoid breaking the device. Looking at the schematics you pasted in probably picking up the signal at C110. Of course you need to check whether the oscillator of U26C does not stop oscillating due to the additional load. That might happen.

    Best regards

    Peter

  • I'm going to try your suggestion. I have a wave generator wich can generate a square wave up to 10Mhz, shall hope it will be enough.

    I'll came back to let you know! Thank you.

  • Hello Peter,

    Regarding your advice, it works very nicely. I've applied a 10Mhz signal using a 10K series resistor to the OSC0 pin and the JTAG recognized the MCU and  allow to program with a code not using external crystal.

    Thank you very much for your input. The problem is solved!

    Best Regards,

    Andre Tomas.

  • Hello Andre,

    many thanks for your feedback. I am glad to hear you were able to solve the problem.

    Just one comment on the E2E infrastructure. Please in future if you want to post a final comment to a resolved case, first post the response and than click the "resolved" button. The reason is, if you do it the opposite sequence, the thread remains open, as any reply within a certain time frame re-opens the case.

    I close this one from my side. A lot of success in further R&D activities!

    Best regards

    Peter

**Attention** This is a public forum