Login

Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.

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

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Just got an STM32F4 discovery board.. Needing a little help :-) Rate Topic: ****- 1 Votes

#1 User is offline   3vix6 

  • Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 17-June 12

Posted 17 June 2012 - 06:43 AM

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
0

#2 User is offline   Joseph Yiu 

  • Regular Contributor
  • PipPipPip
  • Group: Members.
  • Posts: 217
  • Joined: 01-March 10

Posted 17 June 2012 - 05:58 PM

Hi 3vix6,

Welcome!
First, download the firmware package from ST web site:
http://www.st.com/in...duct/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/in.../DM00039084.pdf

and the user manual for this chip (RM0090)
http://www.st.com/in...duct/252140.jsp
http://www.st.com/in.../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.ar...tex_m4_dgug.pdf

Hope this helps.
regards,
Joseph
1

#3 User is offline   3vix6 

  • Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 17-June 12

Posted 18 June 2012 - 12:47 AM

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.
1

#4 User is offline   isogen74 

  • Super Contributor
  • PipPipPipPip
  • Group: Members
  • Posts: 1098
  • Joined: 20-March 07

Posted 18 June 2012 - 07:15 AM

Quote

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?



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.


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.
When optimizing software, consider that the quickest code to run is the bit you removed from the call path.
0

#5 User is offline   Joseph Yiu 

  • Regular Contributor
  • PipPipPip
  • Group: Members.
  • Posts: 217
  • Joined: 01-March 10

Posted 18 June 2012 - 11:34 AM

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/pu...2/AllItems.aspx

regards,
Joseph
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic