cancel
Showing results for 
Search instead for 
Did you mean: 

How to startup with configuring STM32 GPIOs

sabasit2006
Associate II
Posted on November 25, 2008 at 10:44

How to startup with configuring STM32 GPIOs

9 REPLIES 9
sabasit2006
Associate II
Posted on May 17, 2011 at 12:51

Dear all,

Kindly tell me how to start-up with the SMT32 GPIO programming.

Can anyone provide me the basic registers of gpios.

I have the STM evaluation board, the software require multiple header and C files from library.

Please provide me the stand alone program related GPIO, RTC, Timers.

regards

Abdul Basit

jilisegiar
Associate II
Posted on May 17, 2011 at 12:51

Refer to

http://www.st.com/mcu/modules.php?name=mcu&file=familiesdocs&FAM=110#Firmware

and you will find what you need

GPIO:FWLib/examples/GPIO/IOToggle

RTC: FWLib/examples/RTC

Timers: FWLib/examples/TIM

Note: each example has a readme file explaining how to use it.

[ This message was edited by: jilisegiar on 11-11-2008 08:25 ]

jj
Associate II
Posted on May 17, 2011 at 12:51

Hi Abdul,

I agree with jilisegiar's advice. Suspect that you looked at the size/bulk of ''start-up/configure'' software - it is daunting. (much work just to toggle an led)

This is true of all ARM - the capability & flexibility is provided at the cost of complexity.

Suggest that you start with FWlib examples - later you can attempt to compact/simplify - after you have gained basic mastery...

sabasit2006
Associate II
Posted on May 17, 2011 at 12:51

Dear jj.sprague,

I agree with u, but there are various files which need to be add in the project file. this makes me confusing.

If u have any independent project file plz provide me.

Do u have any quick start of programming the stm32 @ RIDE7. I have the user manual, but it consume much time.

please help me.

jj
Associate II
Posted on May 17, 2011 at 12:51

Hi Abdul,

My firm has settled on IAR - recommend it - you can download free ''Kickstart'' version which supports up to 32KB of program code.

If time & ease is important - suggest that you get the IAR-ST ''STM32-SK'' development kit. (should be on this site & @ IAR too) This includes a JTAG-SWO device - which is highly efficient.

Many prefer open-source tools - they are more complex than the ARM uC development. They have the advantage of lower cost - and unlimited code size but at the cost of great time investment & multiple ''gotchas.'' I would investigate this path only after you have gained a basic mastery of the STM32 - and I believe my earlier suggestion achieves this.

There are examples w/in the suggested toolset which will get you going - working with the kit is the best way to build, speed & ease your understanding...

relaxe
Associate II
Posted on May 17, 2011 at 12:51

To start very quickly using GPIOs with RIDE:

1) Download, uncompress the latest (2.0.3) Firmware Library from ST.

2) Copy every files from the \examples\GPIO\IOToggle directory to \project

3) Open projet\RIDE\project.rprj with RIDE

Enjoy!

PS: All RIDE users, correct me if I'm wrong!

gculliven
Associate II
Posted on May 17, 2011 at 12:51

Hi there i am writing a piece of assembly for the stm32. I dont actually hve a stm32 this is for a uni assignment. Using the thumb two inst set I have produced a bit of code for the function required. But I can't seem tofind how to use the timer and initialise the i/o ports. Can you help? Thank you Gavin

jilisegiar
Associate II
Posted on May 17, 2011 at 12:51

Don't copy ''stm32f10x_conf.h'' copy just the following files:

- platform_config.h

- stm32f10x_it.c

- stm32f10x_it.h

- main.c

jj
Associate II
Posted on May 17, 2011 at 12:51

@Gavin,

These ARM uCs have vast flexibility - this causes great complications in set-up/configuration. Don't believe that ''set-up/config'' mastery is the point of your assignment.

Should you choose to persist look in the Documents/File s