0
\$\begingroup\$

I ordered one of these which has a single row of pins

  1. Single-row

STM32F103 board with single row of 0.1" I/O pins


While there are also these which have double row of pins:

  1. Double-row

STM32F103 board with double row of 0.1" I/O pins

I wonder what I miss ... of course a lot of pins difference, but I'm not sure what those pins are, are those pins I cannot use at all, and are some of those pins I will miss having special functions like UART/SPI etc I cannot use?

For me it's a but unclear what pins mean what (used to the Arduino where every pin has it's own meaning).


  1. Minimal

STM32F103 "Minimum System Development" board

This one does not have the JTAG (I also ordered a USB TTL converter and JLINK 'stick'. Do I have the same functionality as like 1 or 2 above in this case?

\$\endgroup\$
12
  • 1
    \$\begingroup\$ Is it actually missing any pins or are they just in a different layout? \$\endgroup\$
    – pjc50
    Commented Jul 28, 2017 at 12:48
  • \$\begingroup\$ @pjc50 If I count roughly I see quite some more on the double row, I didn't cross check all pins, but it seems some nonconsecutive numbers are missing \$\endgroup\$ Commented Jul 28, 2017 at 12:54
  • 1
    \$\begingroup\$ The STM32 allows a considerable degree of pin re-mapping so it's unlikely you'll lose access to any particular functionality, just that you'll have fewer pins in total to play with. \$\endgroup\$
    – Finbarr
    Commented Jul 28, 2017 at 12:55
  • 1
    \$\begingroup\$ As to #3, I use the same part, and w.r.t. programming, on-chip debugging (and powering) the board, the ST-Link works just fine. Look at the JTAG's pinout. Of the 20 pins, there's 9x GND, 2x Vcc and 2x N/C. Huge waste of space! \$\endgroup\$
    – JimmyB
    Commented Jul 28, 2017 at 13:10
  • 2
    \$\begingroup\$ Re potentially missing pins: I'm afraid you'll have to go the classic route: figure out which IO peripherals you want to use, then check the datasheet of the F1 and see which pins they support, then see if any of those pins that matter to you are missing on a board. I assume that for basic projects any board will do (a few ADC inputs, one or two UARTs, one SPI, one I2C, CAN will probably all be available.) \$\endgroup\$
    – JimmyB
    Commented Jul 28, 2017 at 13:36

3 Answers 3

1
\$\begingroup\$

Comparing STM32 boards with arduino in my experience will confuse you. STM32 boards have ports which in turn have pins.

If you want to use PC05, you need to enable clock on Port C (known as GPIOC) and initialize GPIO_Pin_5, you now have control over that pin you can set it as open drain, AF etc; you can also set the speed. You also have a lot of more freedom in that if you want to use I2C it doesn't have to be on any specific pin, you can use whichever on you want (although some pins on some ports can't be used for specific peripherals, I highly advice reading the ref manual for your baord and the specific peripherals you want to use).

If your board has more physical pins then you can connect more devices, you dont lose things such as UART, I2C, SPI etc; you just have less pins to use them on.

I'm assuming you are new to STM32, just to let you know that you need to get an stlink (version 2 for that board) in order to program the board (you can't cheap out on this). It also helps you debug your program.

It's also hard to find an IDE, so you can use http://www2.keil.com/mdk5/uvision/ (the only I used and would highly advise to use it) or simply just use the Arduino one (I highly advise against this if you want to learn more about embedded).

\$\endgroup\$
16
  • \$\begingroup\$ Thanks for your elaborate answer ... it's good to know I can use enough peripherals... eventually I want to use an F4, but I bought this (still has to arrive) for testing. I don't think I ever will need all the pins, maybe for one device all UARTs (or USARTS). Interesting part about the IDE .. I checked about the Arduino which seems easy, but you say it's not so good for learning, so maybe I should dive in deeper into the one from keil.com... I did some 'dummy testing' on mbed and that works fine too (without physical STM32). \$\endgroup\$ Commented Jul 28, 2017 at 14:17
  • 1
    \$\begingroup\$ I don't really know anything about visualMicro. A very quick glance suggests it's only C++ and high level languages, which I wouldn't think are great for learning embedded. However, if I am wrong, it has C, you can use it with a JTAG debugger and you like it - why not? :) mbed, I think, is an operating system. I would learn run-to-complete before diving into the wonder world of OSes. \$\endgroup\$
    – DiBosco
    Commented Jul 28, 2017 at 14:32
  • 1
    \$\begingroup\$ I can't recommend this highly enough. rowley.co.uk/arm I get the impression you might be a student, they do very cheap student licences. \$\endgroup\$
    – DiBosco
    Commented Jul 28, 2017 at 14:33
  • 1
    \$\begingroup\$ @MichelKeijzers I'm assuming that you are used to the wonderful intellisense that VS offers and lots of helpers that generate code for you in a click of a button. I program in c# and VB too and i'm used to VS, if you want to continue doing so you can get VisualGDB (which isn't free) which intergrates with VS and run pretty much like an ordinary project with some additions. DiBosco When i started Stm32 i found it hard to find an IDE since no one was would directly tell you which one to use, so i went with Uvision and have stayed with it since. I like it enough that dont look at other IDE's \$\endgroup\$
    – kelvinmac
    Commented Jul 28, 2017 at 14:44
  • 1
    \$\begingroup\$ There's a home licence too. So, if it's just for non-commercial purposes there's also a cheap one! As far as C++ is concerned for embedded, hmmmm, that's a whole holy war. ;) Not really sure why structures require C++. The one time I have thought C++ would be useful for embedded projects is for a project with an LCD and lots of screens that are mess to define in C. \$\endgroup\$
    – DiBosco
    Commented Jul 28, 2017 at 15:19
2
\$\begingroup\$

There is no real difference. All have all pins available, and you can use SWD or JTAG probes. Actually on the micros with the very limited pin number SWD is more practical as it only takes two pins.

\$\endgroup\$
5
  • \$\begingroup\$ How can they have all pins available if there are many less physical pins? According to other answers, not all pins are available. \$\endgroup\$ Commented Jul 29, 2017 at 11:21
  • 1
    \$\begingroup\$ @Michel Keijzers I do not understand what you mean. But some of the uC pins are available in more than one place for the user convenience. the minimal one: kner.at/home/50.arm/… Some of them are available on the top of the board (ie boot0 & 1) Another picture developer.mbed.org/media/uploads/hudakz/… \$\endgroup\$ Commented Jul 29, 2017 at 11:33
  • \$\begingroup\$ I still need to find out how to read such diagram (I'm used to an Arduino, where every pin has one function). \$\endgroup\$ Commented Jul 29, 2017 at 11:43
  • 1
    \$\begingroup\$ No arduino in most models is just an atmega - and atmegas pins have different functions as well. Arduino analog and digital ports is just the simplification for the absolute beginners. It is not a teaching portal. Google it, read about the micros - do your own research. Do not follow the arduino path which means - codes from internet, no knowledge, no effort. \$\endgroup\$ Commented Jul 29, 2017 at 11:46
  • \$\begingroup\$ You are right indeed, so far I used the default Arduino IDE (or vMicro which works similar). \$\endgroup\$ Commented Jul 29, 2017 at 11:58
1
\$\begingroup\$

The first two boards can be programmed via J-Link (JTAG + SWD + SWO) or ST-LINK (SWD only). The last one is SWD only, unless you break out the JTAG pins.

You may have to ask the vendor(s) for schematic to know the differences exactly. I have the second type and found it to be quite easier to play with than the bare bones ones.

This one does not have the JTAG (I also ordered a USB TTL converter and J-Link 'stick'. Do I have the same functionality as like 1 or 2 above in this case?

The chip is the same - unless you get one with the STM32FEBKC6T6 - I have seen some of them. They are functionally the same as STM32F103C8T6, but you will have to get the datasheet to play with it.

As for IDE, if money is of no issue, I prefer older (v4 and ealier) Keil or IAR. They are simple and dependable.

For personal projects, I use CoIDE by CooCox (pre-v2.0) and GCC. It gets the job done quickly - it actually compiles faster than Keil / IAR and can program the chip with one click.

\$\endgroup\$
6
  • \$\begingroup\$ Thanks for all info ... so far I don't know exactly the difference between JTAG or SWD. I ordered the first type so I guess it will be similar to the 2nd (which you have). In what sense it is easieri to play with? Because of the JTAG? No I have the 103C8T6 ... For IDE I have to check ... guess it's mostly personal preference based, and partly money based. \$\endgroup\$ Commented Jul 28, 2017 at 15:11
  • 1
    \$\begingroup\$ JTAG and SWD are both interfaces for accessing the on-chip debug. Both give you a way of setting breakpoints and single stepping through the code. JTAG uses more lines than SWD, but both work fine. I like to have a proper JTAG (or SWD) interface so that I can connect my standard interface to a board rather than some crappy on-board one that might have driver issues. \$\endgroup\$
    – DiBosco
    Commented Jul 28, 2017 at 15:30
  • \$\begingroup\$ @DiBosco ... I really have to search more about JTAG/SWD ... I ordered an STLink for picture 3 (which I ordered), and I think I should get another one for picture 1 (ordered that too). But do I also need to buy something extra for using JTAG or SWD? \$\endgroup\$ Commented Aug 1, 2017 at 12:18
  • \$\begingroup\$ The STLink is a JTAG/SWD interface. Sadly, this only works with ST products; another advantage of using Crossworks with a Crossconnect (or Keil with a uLink or other independent IDEs) is they work with any ARM device. To explain the JTAG/debug set-up: on the chip you have a debug module which allows you to set break points, single step, look at registers, memory SFRs etc. This debug module communicates with your IDE via JTAG or SWD. JTAG uses up to 20 connections (but you can get away with eight or nine), SWD, just four (including power and ground). \$\endgroup\$
    – DiBosco
    Commented Aug 1, 2017 at 12:39
  • \$\begingroup\$ So, now you have your ST Link you have all you need (assuming your IDE works with it). \$\endgroup\$
    – DiBosco
    Commented Aug 1, 2017 at 12:41

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.