3
\$\begingroup\$

I try to make a custom board for the STM32F303K8T6 and I am not sure if I do it right. Actually the design is oriented on the STM32F3Discovery. I will not run time critical applications so that I don't need an external oscillator. To flash and debug, I want to use the SWD, but there I am not sure, if I really need the V3.3 pin? Is this PIN not to power the board with the SWD? So when I activate the voltage regulator when I flash, this should be redundant, right?

Schematic:

enter image description here

\$\endgroup\$
  • 2
    \$\begingroup\$ the ST Micro ARMS tend to have a boot pin that selects or disables the ROM bootloader (which can be very handy in manufacturing and first-time flashing).you should probably expose that to a jumper, too! \$\endgroup\$ – Marcus Müller Jan 12 '17 at 19:51
  • \$\begingroup\$ I adjusted the boot0 pin such that I can choose GND or 3.3V. Can I do this in such a way? \$\endgroup\$ – HansPeterLoft Jan 12 '17 at 20:10
  • \$\begingroup\$ that looks great! \$\endgroup\$ – Marcus Müller Jan 12 '17 at 20:12
1
\$\begingroup\$

With SWD or JTAG you don't need to power the device for it to flash. But you do have to power the device somehow while flashing. I use JTAG and SWD and built a board with a jumper to either power it from the ST-link or use the power on the board (I think you might be able to buy these).

Its probably better to not use both to power because the regulators on the board and the flash tool are not going to be exactly the same voltage and you could get power flowing from one to the other. So put an option on the board or flash tool to select use.

\$\endgroup\$
  • \$\begingroup\$ Ok, thank you, so I think I will use only 4 pins for the SWD port, such that I save as much space as possible. Is it possible to use the debugger over SWCLK and SWDIO? Do you see other problems? \$\endgroup\$ – HansPeterLoft Jan 12 '17 at 19:58
  • \$\begingroup\$ What is about R1? How big should I choose it? \$\endgroup\$ – HansPeterLoft Jan 12 '17 at 20:00
  • \$\begingroup\$ I can't speak for 'other problems' (this isn't a design checking service) but you can use the debugger over the SWD interface. \$\endgroup\$ – Voltage Spike Jan 12 '17 at 20:02
  • \$\begingroup\$ 10k is probably sufficient. I'd have to check the datasheet. Usually you have to hold it low for a few clock cycles. \$\endgroup\$ – Voltage Spike Jan 12 '17 at 20:07
1
\$\begingroup\$

The purpose of the 3.3 V pin on the SWD connector is not to provide supply voltage but to monitor it.

If you have a look at the schematic of an ST-Link's SWD connector, the 3.3 V pin is connected to an ADC.

enter image description here

By default the ADC is disconnected as R2 is not fitted on the board.

\$\endgroup\$
  • \$\begingroup\$ Ok, so the 3.3V pin is not mandatory? \$\endgroup\$ – HansPeterLoft Jan 13 '17 at 12:55
  • \$\begingroup\$ It is not. But the board should be supplied from a source. \$\endgroup\$ – Bence Kaulics Jan 13 '17 at 14:46
0
\$\begingroup\$

Whether you need 3.3V or not depends of course which debugger you use. But usually the debugger wants to use the same voltage levels when communicating with the target, so many debuggers do not work without VCC from target. It would also be a very bad debugger if it always assumed communication with 3.3V targets, as this would fry targets using 1.8V from batteries. If you intend to only debug it with the Discovery that always uses 3.3V and your target always uses 3.3V and there is not much difference between separate 3.3V supplies, the you can live without. If you intend to debug with a separate debugger such as ST-Link/V2 then you must have target 3.3V available as reference or it will not work at all.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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