2
\$\begingroup\$

I want to make a custom board from STM32F4. Suppose I follow schematics with the minimum required components, like crystal, reset switch, voltage regulator, JTAG connection, etc. and assemble them on a PCB, will it be ready to be programmed like any STM32 board that is sold?

Or is there an intermediate thing that have to be done to make the board usable?

\$\endgroup\$
  • \$\begingroup\$ Does the datasheet tell you that it comes with a bootloader? \$\endgroup\$ – Ignacio Vazquez-Abrams Dec 13 '16 at 19:29
  • \$\begingroup\$ @Ignacio Vazquez-Abrams No, I couldn't find statement talking about bootloader. What do I do now? \$\endgroup\$ – Ajit Dec 13 '16 at 19:53
  • \$\begingroup\$ Provide a programming connection on the board. \$\endgroup\$ – Ignacio Vazquez-Abrams Dec 13 '16 at 19:55
  • \$\begingroup\$ @Ignacio Vazquez-Abrams yes, do u mean a JTAG connection? \$\endgroup\$ – Ajit Dec 13 '16 at 19:59
  • 2
    \$\begingroup\$ @Ajit - in fact that STM32F4 (and AFAIK the entire STM32 line) has a factory ROM bootloader that can use multiple interfaces, but it would be unwise to build a board that did not break out the SWD pins, as they are so useful not only for programming but for figuring out what is going wrong. Also bring out at least one UART regardless if you plan to use it or not. \$\endgroup\$ – Chris Stratton Dec 15 '16 at 18:24
3
\$\begingroup\$

There are plenty of resources by ST. I have learnt a lot from STM32F4 Discovery documentation for example. It is a pretty good board in my opinion so it makes a good reference material.

Personally I prefer SWD programmer when it comes to STM32 because with a Discovery and its on board ST-Link you can program any other custom STM32 board through a four pin connector.

The other important document is the Getting started with STM32F4xxxx MCU hardware development. Of course there are one for each series.

All necessary points are covered:

This application note is intended for system designers who require an overview of the hardware implementation of the development board, with focus on features like

• power supply

• package selection

• clock management

• reset control

• boot mode settings

• debug management.

Reference designs included as well and some recommended PCB routing guidelines for STM32F4xxxx devices. All in all really useful.

More application notes here if you are interested in specific peripherals.

\$\endgroup\$
  • \$\begingroup\$ Thank youuuuu all!! All the info is encouraging..i m on way to make the board now.. But I ll take time..i will update with my results when it happens :) \$\endgroup\$ – Ajit Dec 15 '16 at 22:28
  • \$\begingroup\$ good luck with your board :) \$\endgroup\$ – staringlizard Dec 16 '16 at 8:14
5
\$\begingroup\$

Yes, that will be fine. The board will always be accessible through JTAG, or swj-dp as is it called.

Here is some general advice though:

  • Do not forget about the BOOT pins. They need to be set correctly for your purpose (dictates where MCU starts executing).
  • Do not connect the reset pin directly to Vcc as I have seen many examples of. See datasheet for more information.
  • Figure out if you really need an external crystal. The STM32 internal clock is good enough for many applications. However, if you are planning to use USB, then an external crystal is needed.
  • Do not forget the bypass capacitors! At least 100 nF for each power pin, preferably more.
  • Keep in mind that you can not have multiple external interrupts for one interrupt line. For example, you cannot have an external interrupt on both PA6 and PB6.
  • Do not be shy with the power input to the microcontroller! Choose carefully.
\$\endgroup\$
  • \$\begingroup\$ thank you very much. Currently I might not have understood your whole answer but its definitely a good answer for me to work on. what you are saying is if I just assemble the hardware properly I be able to feed program like I do on a ready-made board, did i get it right? \$\endgroup\$ – Ajit Dec 15 '16 at 12:58
  • \$\begingroup\$ No problem :), yes that is correct. If you are unsure about anything in the process of making your custom board a great advice would also be to look into the schematics from some of the many development and evaluation boards made by ST themselves, for example the "discovery board". \$\endgroup\$ – staringlizard Dec 15 '16 at 13:07

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.