10 years, 1 month ago.

Minimum viable standalone setup

Hi!

I'm wondering if anyone can point me in the right direction regarding a minimum viable setup would be for an stm32 chip, or a Kinetis kl25z.

I've been searching, but I haven't found any concrete examples of what is the minimum components I would need to add one of the stm32 mcu, or kinetis, to a protoboard with a swd header. Where can I look to find something like this out?

2 Answers

10 years, 1 month ago.

For the KL25Z this gives some idea: http://mbed.org/cookbook/Prototype-To-Hardware-KL25Z. I think very little is required. The SWD connections obviously, reset switch (with pull-up I assume, but never looked really into it). The crystal is a requirement with the standard mbed lib and if you want to use USB. Without that it should also run fine without crystal (then you need to delete the mbed lib, import mbed-src, and in the target specific CMSIS startup file you can define one of the other clocks, in your case the FLL setup should run fine, but you can also manually make one). Obviously supply decap capacitors are required (100nF per supply pin is generally a reasonable idea). If you dont have a 3.3V source you will need a regulator for that.

And probably add an LED to blink ;).

Accepted Answer

I guess what I'm looking for is more of a step by step example. I'm reading through the datasheet for the STM32F030R8T6 chip, and I can see which pins are clk, dio, and reset, but it is unclear on how I need to wire up the power and ground, or the crystal. There are several VDD pins, which I assume I need to wire them all to 3.3v with the 100nf caps that you mentioned, but what about VSSA and VDDA. Are they voltage reference, would I just need to wire them also to 3.3v?

posted by Adam Olsen 06 Mar 2014

This can give you an idea of what you need for the KL25Z schematic wise: http://mbed.org/users/mbed_official/code/mbed-HDK/ (there is a small download as zip button you need). Thats the complete thing, so you don't need the programming part (K20).

VSSA is analog ground, VDDA is analog power supply. You can simply connect them to ground and 3.3V. (Not ideal for AnalogIn accuracy, but good enough for a minimal components)

posted by Erik - 06 Mar 2014

Ah, that's perfect, thank you! A lot simpler than I had imagined in my mind.

posted by Adam Olsen 06 Mar 2014

Does the crystal need to be a certain speed for mbed?

posted by Adam Olsen 07 Mar 2014

It needs to be an 8MHz crystal. Different values can be used too, but then you need to modify the startup code. Which is possible, but easiest option is to use an 8MHz crystal, for sure powers of 2 are adviced, so 4, 8, 16, etc. Otherwise the timer used for Ticker objects does not have a crystal source (it will go to an internal oscillator as backup, but that isn't as accurate).

posted by Erik - 07 Mar 2014

How does the Nucleo F401RE run at 84Mhz? They just modified the startup code for it?

posted by Adam Olsen 07 Mar 2014
10 years, 1 month ago.

I suggest you look at the dip cortex boards. http://mbed.org/platforms/DipCortex-M3/ The NXP parts have a mass storage boot loader in ROM so you can in circuit program over USB and leave off the SWD header.

They definitely look cool, but I'm mostly just curious about how such boards are built and how I can include stm32 in my own designs.

posted by Adam Olsen 07 Mar 2014