My STM32F4 love story

Recently I bought a STM32F4-discovery. It is a development board for 32-bit ARM based micro-controller. There are a STM32F407VG MCU, two MEMS sensor (1 accelerometer and 1 microphone). It also comes with a ST-LINK V2 so we got everything we need on this small board to flash the chip and play with it.

This is the second micro-controller series that I got my hands on. The first one was PIC and it relative. But I wanted some change and wanted to learn something new. Beside, everybody’s talking about ARM nowadays. It gotta have something good in it, I guessed.

And OMG, it’s so complicated. What was I talking about, of course it has to be complicated, more complicated than dsPIC perhaps. 32bit versus 16bit on dsPIC or 8bit on PIC micro. I was drowned by the documents provided by ST, the library STM32 CUBE that ST has released recently. I know there’s no shortcut. I have to read through its datasheet and its family reference manual.

But nothing can stop me from having a little fun at the beginning. This board armed with an accelerator after all. The demo code inside should detect the board tilted angle and translate that information to lit up one of the four LEDs on board. I was very excited to see the LED light up when I tilted the board. But…nothing happened! After a quick Google search, it turns out that this board has a more advanced accelerometer (LIS3DSH) and ST demo code was simply not updated. The PCB version is MB997C, not MB997B like in the photo above. Get your stuffs together ST?

So I decide that my first project with this board is to figure out how to read accelerometer data from this MEMS sensor and either blink some LEDs or print that data to PC.

Ok, I got the board, got the documents. Next step is to get the tool chain.

Advertisements

3 thoughts on “My STM32F4 love story”

    1. Yes, I had done reading the on-board accelerometer via SPI, using libopencm3, then plot it on PC via a python script (this is also open source). But I’m too busy right now to write any thing. If you want I can send that project to you via email or github perhaps? In my opinion, libopencm3 is pretty simple to understand and use compared to ST lib.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s