Page 1 of 1

STM32 Nucleo

PostPosted: Wed Feb 26, 2014 11:59 am
by Brian Griffin
ST Corp. has just released an mBed platform prototyping board with Arduino shield slot: STM32 Nucleo I have that board right now, and will test it using mBed and with another compiler (Eclipse + GCC).

There are few models available and I choose the STM32F401 because of the floating point unit. However, you can choose the other models according to your application.

stm32nucleofront.jpg


stm32nucleoback.jpg


The integration to mBed is very straightforward, but to use another compiler is a very difficult task as the ARM microcontrollers can be very complicated for begineers. :)

Re: STM32 Nucleo

PostPosted: Thu Feb 27, 2014 7:56 am
by ober
Nice one! Can we use CooCox IDE?

Re: STM32 Nucleo

PostPosted: Thu Feb 27, 2014 9:08 am
by Brian Griffin
It would run CooCox IDE but with a few modifications to the code. On the clock/oscillator side, the Nucleo is using the onboard oscillator. To use the crystal, you will have to desolder/solder some solder bridges on the board according to the manual book.

Re: STM32 Nucleo

PostPosted: Thu Feb 27, 2014 11:21 am
by ober
Great to know that, thanks for sharing!

We are looking into another Cortex-M0 MCU from Nuvoton, really hope I have 48 hours a day :) No time to explore too many stuff.

Re: STM32 Nucleo

PostPosted: Thu Feb 27, 2014 12:10 pm
by Brian Griffin
The Cortex-M0 is a good little microcontroller. It also exists in a 28-pin DIP which is by NXP, called LPC1114FN28. I haven't get around to programming it anyway, but you can breadboard the thing and run it from there.

I just read the mBed forums that the Nucleo for the STM32F401 uses the onboard oscillator (16MHz) instead of an external one. It will be a bit more effort to connect it to a crystal though as it has a slot for a crystal and two empty pads for SMD capacitors.

I'll be putting an FFT (Fast Fourier Transform) inside these things. Yes, it is a difficult topic especially in undergrad (and postgrad) levels and I needed it a lot for many things in my work.

Re: STM32 Nucleo

PostPosted: Fri Feb 28, 2014 10:50 am
by Brian Griffin
I have just tried to write a simple code using GCC + Eclipse and the STM32 libraries (becoming STM32Cube) but it ended up with a lot of compile errors due to missing links and such.

Luckily I've referred to some pages about compiling GCC and STM32 libraries using Eclipse: here's the guide and now I got the thing to compile. Due to the new version of the libraries the ST released a few weeks ago, I have to manually place the correct files into the folders so that it will compile, all by trial and error. Unfortunately, Eclipse doesn't have a "New Code Wizard" thing if you have to "create a new project with a microcontroller", so you have to rely on copying the template projects and rename it later.

I'm figuring out how to do the same in Coocox IDE - but because of the new libraries for STM32 series, I'll have to wait until they integrate these into the compiler.

The Nucleo has potentials of becoming a good platform because of the support of the Arduino-compatible shields and being mBed compatible. :D

Re: STM32 Nucleo

PostPosted: Fri Feb 28, 2014 11:22 am
by sich
It feels like the AIO (All-In-One) board, just like AIO printers. Arduino, mbed, ARM 32-bit... all the famous terms in the market nowadays are included in one single board ;)

Re: STM32 Nucleo

PostPosted: Fri Feb 28, 2014 1:28 pm
by Brian Griffin
sich WROTE:It feels like the AIO (All-In-One) board, just like AIO printers. Arduino, mbed, ARM 32-bit... all the famous terms in the market nowadays are included in one single board ;)


Yeah. The mBed, Arduino and the RaspPi are the popular ones nowadays. Even Arduino's coming up with Arduino Tre which uses a Cortex A8 processor. :)

Re: STM32 Nucleo

PostPosted: Mon Mar 03, 2014 3:09 pm
by Brian Griffin
After a painful amount of trial-and-error, I got some of the things working in the Nucleo with Eclipse. Apparently, most of the libraries have changed to the STM32Cube so I could not fully use the examples from other websites. Worse of all, the documentations for the new libraries are very, very sparse. There are a lot of guesswork involved so patience is required.

I managed to have the ADC module to work here by using the software STM32CubeMX, single sample and also working with the Seeedstudio TFT shield (bought from Radioshack Malaysia). It's flickering due to the slow access of the pins which are not arranged in the straightforward way (all the pins from PortA, PortB and PortC scattered all over the board). The ADC here is sampling the LM35's output and the TFT shows "105", which directly translates to around 33 degrees Celcius (105 * 3.3/1024).

nucleo-test1.jpg


TFT code is from http://www.seeedstudio.com/wiki/2.8''_TFT_Touch_Shield_V1.0.

Unfortunately, mBed's analog-read doesn't support Direct Memory Access or other fancy features which I need for my work, therefore I didn't use it much.