3
\$\begingroup\$

In a recent project of mine using an ESP32 and a CC1352, I noticed that on both programming headers there are 3V3 and GND pins, which are, I suppose, to power the device if you want to program it when it is not connected to anything.

In my scenario however, both MCUs are powered by the PCB they are on. I noticed that I couldn't get the flash process to reliably work if I powered the chips from the PCB and only connect the non-power pins, which for the ESP are TX-RX-IO0-EN and for the CC1352 is RX-TX-JTAG. If I disable power on the PCB and I also connect the 3V3-GND pins, on both MCUs I can reliably flash everytime.

Is this the expected behaviour?

To me it seems quite strange that if a customer has an MCU on a big board he has to turn off the whole machine just to flash that specific chip. For example often there are JTAG connectors on motherboards. Is the user supposed to turn off the PC to use the JTAG interface?

EDIT

I forgot to mention that on the other end of the programming header, for the CC1352 for example, there is a debug probe taken by the CC1352 Launchpad. I am hesitant to connect its VCC-GND to my PCB because the PCB components take VCC-GND from the voltage regulator, and on the launchpad they come from the USB. If I bridge the two I would be connecting the VCC of USB 2.0 to the VCC of a voltage regulator, same for GND, I'm not sure if that would be safe. Similar situation on the ESP32.

\$\endgroup\$
2
  • \$\begingroup\$ My Segger is set on the PC side whether or not to provide power through the JTAG connector. You need to connect the ground pin though...signal reference. \$\endgroup\$
    – DKNguyen
    Feb 1, 2022 at 18:41
  • \$\begingroup\$ Obviously you need the ground. When you need to support multiple DC power sources supplying the same circuit just guard them each with a diode so they can't backfeed each other. You haven't shown us what your board looks like. If you're using development boards they may already have these features. If you built the board then you need to add those features. \$\endgroup\$
    – J...
    Feb 2, 2022 at 14:31

2 Answers 2

12
\$\begingroup\$

Well, you certainly must connect the GND pin so that the programmer and the mcu share a common ground.

The 3V3 pin is not necessarily there to power the MCU. Some programmers (eg. Segger's J-Link) will work with MCUs at different voltages, and this pin is used just to sense the voltage level for the interface. Without a manufacturer's datasheet of your debugger we can't know one way or the other.

\$\endgroup\$
1
\$\begingroup\$

To add to @Elliot's answer, I have seen debuggers (SWD for STM32 or NXP Cortex-M) which had a level shifter - with the lines going to the MCU powered by the boards VCC.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.