9
\$\begingroup\$

I'm looking into a new industrial controls application, and from my searches I have narrowed it down to 2 microcontrollers that look to fit the application well. The STM32 and the Kinetis. They both seem very capable of doing the job and I have already used the STM32 in a different somewhat unrelated application. I like the STM32 family since there is such a wide selection of configurations that are all for the most part pin compatible. The Kinetis however looks to be a bit more bang for the buck processor/memory wise.

So my questions to anyone with a bit more experience with these is... What are some of the advantages and disadvantages to each family?

I am pretty sure there isn't exactly a wrong choice here for my application, but I would like some more details from someone other than Freescale and ST. I realize the details of my application may be a factor here, but it's a very broad application as far as functionality goes. Our biggest limit that has pushed us to moving to a different controller is memory (~16k RAM 256k flash).

Any insights would be greatly appreciated. Thanks

\$\endgroup\$
3
  • \$\begingroup\$ The STM32F4 has a Cortex-M4 with floating-point and DSP, and up to 1MB of flash and 192 kB RAM. A cheap board is available with several interesting peripherals. \$\endgroup\$ Commented Oct 31, 2011 at 20:35
  • \$\begingroup\$ Configurations (same pin out different memory and processing power) and maturity.. STM32 is the way to go.. \$\endgroup\$
    – Ktc
    Commented Feb 12, 2012 at 15:11
  • \$\begingroup\$ Two enter... one leaves. \$\endgroup\$
    – joeforker
    Commented Oct 4, 2013 at 15:33

5 Answers 5

7
\$\begingroup\$

Of the STM32 (ST Microelectronics) and the Kinetis family (Freescale), I have only worked on the STM32 family of processors and therefore, I will be able to detail my experience with the STM32 and hoping that someone else can do the same for the Kinetis, so you can contrast the two. This list may not be complete, and is simply based on my experience.

PROS:

  1. ST provide a massive set of libraries for each of their processors that you get for free. These libraries contain a massive list of functions required to do most of the basic low level interfacing with the hardware and can make your life a lot simpler.

    e.g void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct) This initializes the GPIOx peripheral according to the specified parameters in the GPIO_InitStruct.

    Simply populate the GPIO structure (and there are example projects to guide you through this process), and call the GPIO_init function. This saves you having to look up atleast 4-5 registers and figuring out what each bit should be.

  2. Their microcontrollers have the Read protect functionality, which can help you protect your IP to some extent, if not completely. There are tons of microcontrollers out there, that don't really do this very well.

  3. They have a family of low power micro-controllers, their L1 series, that have various different levels of power saving features that can be turned on/turned off when required.

  4. Although there are many manufacturers that are now doing their versions of the ARM CM3 cores, ST's F series chips have had a few revisions and although not completely bug free, they are now fairly mature.

  5. Almost all the variants I have worked on have tons of Timers and other peripherals and you can never have enough of those. :)

  6. To get you started, they have some example projects that can be programmed into their evaluation boards, they almost always give you for free. Although I think most other manufacturers would do the same.

CONS:

  1. Although the above mentioned libraries definitely help a lot, however some of the function names are not intuitive and it takes a while to get your head around their naming conventions. This is not true for the entire library, but there is a fair bit of code, that is not well commented, and you will really have to read it to figure out what it is doing.

  2. If you are using their libraries and want to turn on MISRA checking for your project, you will get tons of errors/warnings as their code does not seem to be MISRA compliant. You will need to find a way to exclude their libraries from your MISRA checking. There are ways around this, but they require a bit of work to do so.

  3. ST's documentation for the processors that I have worked on is a bit poor. Their datasheets are not very well written. The information is not in one central/main document. There have what they call a reference manual, tons of application notes and atleast one datasheet. You have to really trawl through these documents sometimes to find the information you are after.

    They often describe GPIO ports, and a recommended setting for one of the bits
    maybe described 50 pages later.

That is all I can think of at the moment, hopefully this gives you bit of an idea about the STM32 products. I will add more, if I can think of anything else.

A suggestion would be to get an evaluation board for both types of microcontrollers (Kinetis one and an STM32 one), which have the peripherals that you are after, and have a play with them.

That will give you a really good feel for which one suits your needs best.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I wish manufacturers would refrain from having their libraries define and use their own identifiers for everything. Configuring a GPIO port requires looking up all the function registers in the manual to know what all the different modes mean; being able to write code using that information directly would be more helpful than having to then examine the library and its documentation to see how it defined things. \$\endgroup\$
    – supercat
    Commented Dec 22, 2014 at 17:29
  • \$\begingroup\$ @supercat Take a look at Infineon's DAVE IDE. You basically add what they call "APPs" via a GUI and the DAVE thingy takes care of code generation for you. \$\endgroup\$
    – Chi
    Commented Mar 1, 2018 at 18:23
4
\$\begingroup\$

K70 has very buggy silicon. Often peripherals that you have described have only lite functionality; for example, it is a good to use cache with external memory, but if you use this memory with DMA you will need to flush the cache manually. K70 has an LCD controller, but it is almost impossible to achieve a resolution better than 480x272, which is not better than can be achieved with standard MCUs. The K70 has a monster clock generator, but only a few peripherals are able to use it instead of the bus clock.
The most important thing is I've found that the complicated low power management simply doesn't work!

\$\endgroup\$
3
\$\begingroup\$

I assume that you are comparing the Kinetis with the STM32F4 Cortex-M4 processors. I have not actually used either but have been looking at them for possible use in an up-coming project. There are also M4 device families available from TI-Stellaris and announced by Atmel and NXP many of which to include the floating point processor, loads of serial ports and timers.

The support in terms of software for the processors (Freescale and ST) looks good with Freescale providing an interface library and a royalty free RTOS for their parts. ST provide a set of interface libraries that allow the configuration and use of their processors and peripherals.

ST devices seem to win the processing speed war with a quoted speed of 168MHz using (IIRC) a wide memory bus to the program flash. This may or may not be important for you.

The Kinetis parts are the more mature, having been available for nearly a year. As a result there is now quite a large family of devices in production with a wide range of interfaces and peripheral sets. The ST parts have only been out for about a month, although they did release a number of parts at the same time as announcing the family. Their range of parts will increase in much tha same way as their Cortex-M3 family has.

\$\endgroup\$
3
  • \$\begingroup\$ STM32 is available for 2+ years.. Only F4 is out for a few months but F1/F2 has been out there more than 2 years.. We are using it.. \$\endgroup\$
    – Ktc
    Commented Feb 12, 2012 at 15:12
  • \$\begingroup\$ I am well aware that the STM32 M3 based processors have been around for a long time. The question is based on the Kinetis parts (M4 based) so I was comparing the available M4 processor families. \$\endgroup\$
    – uɐɪ
    Commented Feb 20, 2012 at 11:58
  • \$\begingroup\$ Indeed.. But if you compare M4 to M3, there is very little difference in terms of rest of the blocks which gives me confidence. the ARM is arm anyway, it doesn't matter which version because it is going to be vetted by ARM itself \$\endgroup\$
    – Ktc
    Commented Feb 21, 2012 at 1:40
2
\$\begingroup\$

My experience with STM32 and Kinetis K70 boils down to running uClinux on these processors (detailed info on these uClinux ports available here).

If you intend to use external RAM in your application, K70 would be a better choice, in my opinion.

\$\endgroup\$
1
  • \$\begingroup\$ To elaborate further on my post above, K70 has two 8KB caches, one for the I/D bus (which essentially targets memory regions that could be used for running code from), another for the system bus (targets "non-code" memories). From what we are seeing in uClinux contexts, the caches help improve the overall system performance in a somewhat serious way. \$\endgroup\$ Commented Feb 20, 2012 at 15:38
2
\$\begingroup\$

I was recently answering a customer query closely related to this thread. Hopefully, these comments will be useful.

+++++++++++

To highlight the differences between K70 with STM32F2:

  • K70 is Cortex-M4 while STM32F2 is Cortex-M3. In other words, K70 provides on-chip hardware FPU and DSP units.

  • K70 can run the Cortex-M core at 150MHz (although the currently available devices are limited to 120MHz). STM32F2 is limited to 120MHz.

  • K70 provides on-chip DDR and NAND Flash interfaces, allowing for very high densities for external memory devices.

  • K70 has on-chip cache (2 separate 8KB caches for I/D and System bus). This really bootst performance of external memories in a very serious way.

  • K70 provides various security mechanisms to ensure that software can't be copied using external tools (JTAG debuggers, etc).

  • K70 has integrated LCD controller as well as integrated touch interface.

  • similar set of I/O interfaces but this needs to be measured against the requirements of specific application.

Overall, if you are using external memory in your applications and/or need a GUI interface, K70 would be a clear winner. Also, K70 is more performant, generally speaking.

+++++++++++

\$\endgroup\$
1
  • \$\begingroup\$ K7x has 16 bit ADC with PGA while non of STM32 has that. \$\endgroup\$ Commented Jan 16, 2014 at 11:49

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