This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Just got an STM32F4 discovery board.. Needing a little help :-)

Note: This was originally posted on 17th June 2012 at http://forums.arm.com

Hi everyone!

I'm new to the world of microcontrollers. After some research, I bought my first ARM based Microcontroller; the STM32F4 Discovery.

Now, I have a few questions for the community, hopefully someone can answer me.

The first question has to do with the memory on the STM32F4. I was wondering if there was a way to expand the memory? Maybe have the memory on CPU, but then secondary dynamic memory (non flash) that could be added to the 192KB as extended memory.

the second question is which compiler should I start with? I normally run Ubuntu Linux 12.04, but I also have Windows on a virtual machine via Virtualbox that I'm able to load up Keil, and some of the other compilers on. I would personally like to have something that I can run on Ubuntu 12.04. Then again, I'd like to start with something that I can focus less on the software and more on the coding. I'm doing this independantly, so I'm on a budget. Which compiler would be best for me?

the third question is where should I start? I was a little confused as to what I should do first or how to set up a project. Where should I start to figure out how to code for this microcontroller? Are there any great books to read on this?

Thanks,
3vix6
  • Note: This was originally posted on 17th June 2012 at http://forums.arm.com

    Hi 3vix6,

    Welcome!
    First, download the firmware package from  ST web site:
    http://www.st.com/internet/evalboard/product/252419.jsp  (there is a 32.MB zip file in the Design Support section).

    This contains many example in the Project folder. There are examples for:
    - Keil Microcontroller Dvelopment Kit
    - IAR Embedded Workbench
    -Tasking C compiler
    -Atollic TrueStudio

    You should also download user manual of the board:
    http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/USER_MANUAL/DM00039084.pdf

    and the user manual for this chip (RM0090)
    http://www.st.com/internet/mcu/product/252140.jsp
    http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/REFERENCE_MANUAL/DM00031020.pdf

    This chip has 1MB flash and 192K SRAM(3 blocks : 112KB + 16KB + 64KB). For begineers it is not that often that you need to expand the memory. Most of the projects only need a small memory size. But in case you need to, there is an FSMC external memory controller on this chip. However, whether all the signals you need are connected to the connector of the board is another question (I don't know the answer on this either).

    Regarding toolchains, both Keil MDK, IAR and Atollic Trusestudio has free version with 32KB limited. Keil MDK is windows only, and I think this is the same for IAR and TrueStudio. I don't think TASKING has a free version (you can get the evaluation version which is time limited). There are other tool chains that work in Linux, but the STM32F4 examples package is limited to these 4 toolchains.
    Once you decide which toolchain to use, install the software, you can then open the project files from ST web site and start trying out different example projects.

    You can download the Cortex-M4 Generic Device user guide from ARM:
    http://infocenter.arm.com/help/topic/com.arm.doc.dui0553a/DUI0553A_cortex_m4_dgug.pdf

    Hope this helps.
    regards,
    Joseph
  • Note: This was originally posted on 18th June 2012 at http://forums.arm.com

    Thank you Joseph! Thanks for the warm welcome as well!

    The reason I'm asking about memory is that 192KB will be a bit low for the final end product that I'd like to create. Right now, I'll be OK with it because I'm learning the architecture. When I learn design and how to interact with the chip and other components, I'd like to use the same CPU, but with a bit more memory (2 - 4MB max). Would I be able to do that with this CPU?

    I will check out the links you posted and read the documents as well. I installed Keil and TrueStudio. I'm still evaluating which product I'm going to buy.
  • Note: This was originally posted on 18th June 2012 at http://forums.arm.com

    [color=#222222][size=2]When I learn design and how to interact with the chip and other components, I'd like to use the same CPU, but with a bit more memory (2 - 4MB max). Would I be able to do that with this CPU?
    [/size][/color]
    [color=#222222][size=2]
    [/size][/color]
    [size=2]ARM just provides the CPU design, and it is integrated by a manufacturer into each MCU design; they can decide how much RAM, flash, peripherals, clock-speed, external memory and I/O pin-out, etc. There are quite a few companies providing Cortex-M-series MCUs, so there is a lot of variety out there. [/size]
    [size=2]
    [/size]
    [size=2]2-4MB is quite a lot of RAM for an MCU, so it is unlikely you'll get all of that inside the package (from what I can tell you can get quite a lot of flash, but RAM tends to be under 512KB). Remember that you can execute you code and RO data from flash, so that frees up some space. If you need more RAM than that then I think Joseph is right; you'll need to look at an MCU with an external memory interface.[/size]
  • Note: This was originally posted on 18th June 2012 at http://forums.arm.com

    Hi 3vix6,

    The external memory controller (FSMC) in STM32F4 supports external SRAM, PSRAM.
    So, the answer is yes, you can add memory to this chip (64MB maximum).
    Please note that access to external SRAM and PSRAM will be slower than on-chip SRAM.

    By the way, ST has got their own forum:
    https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx

    regards,
    Joseph