Recently I've started on a project which requires a Cortex M3 processor. I have some previous experience with 8bit AVR microcontrollers, so I was hoping for a not to big transition.
So I've bought a STM32L-Discovery kit (since low power is an important point) and started looking at some examples. However, I'm completely stuck at the beginning. When programming with AVR it was all very straightforward, just by including 2 or 3 files it was possible to write a simple main.c for like say a blinking LED.
However the examples in IAR EWARM (which I'm using) all look very bloated, lots of files which make it difficult to start. I'm having the same problem with most online tutorials.
Does anybody know any (very) simple tutorials which might help me. I'm thinking about purchasing "The Definitive Guide to the ARM Cortex-M3" since it seems highly recommended.
This might be a very dumb question but I'm stuck for too long now and I'm feeling a bit desperate.
STM32 microcontrollers offer a large number of serial and parallel communication peripherals which can be interfaced with all kinds of electronic components including sensors, displays, cameras, motors, etc.
Run an example ADC Code for STM32 Microcontroller and play around changing the parameters like PRESCALAR, SAMPLE FREQ, etc. After you have played enough with the code, strip it down. Open the header files and see the register values that are being set in those function calls.
I completely agree with you. I am also starting out and I find it difficult to even scratch the surface! I have some good experience with PICs, but with ARMs the learning curve is really steep.
For the STM32F4Discovery I am using, ST provides a number of examples. Starting from simple pin toggling. I am going through the main.c file which for every example is well commented, and try to understand from there. They have a peripherals library, so locate that and look into the declarations of the functions. I learned a few things like that.
Also make sure you reference the actual manual of the ARM you are using.
I think it boils down to how much time you have to spend. Speaking for myself, I don't have the time to go through the manual and understand how everything works. If you do find some good sources please post them!
In closing I am pasting a couple of urls I am found useful information:
http://www.hitex.com/index.php?id=download-insiders-guides
http://www.micromouseonline.com/category/stm32/#axzz1wMO2VjAI
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With