cancel
Showing results for 
Search instead for 
Did you mean: 

Basic Programming techniques

harshana_n
Associate II
Posted on June 12, 2011 at 07:17

Hi,

I'm very new to ST Microcontrollers, is there anywhere i can find a ref manual on basic programming techniques on STMs. I'm good in C but i would like to know how to how to handle I/Os on these.. i.e, how to assign a input port, and how to output something on a port...

 can anyone please help me ?
4 REPLIES 4
ColdWeather
Senior
Posted on June 12, 2011 at 10:43

1. ARM says about Cortex, CMSIS (core access library) and toolchains - No more Assembler, everything in C!

2. Download the peripheral

http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f10x_stdperiph_lib.zip

and take a look at the firmware

http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=FIRMWARE&ClassID=1734

.

Surely you must understand the peripheral functions und features to program them properly. Read the

http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=REFERENCE_MANUAL&ClassID=1734

and

http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=DATASHEET&ClassID=1734

.

Posted on June 12, 2011 at 15:17

As noted the web resources are quite extensive.

I found the first edition of Joseph Yiu's book to be quite instructive.

http://www.amazon.com/Definitive-Guide-ARM-Cortex-M3-Second/dp/185617963X/ref=tmm_pap_title_0?ie=UTF8&qid=1307884045&sr=1-2-catcorr

http://www.amazon.com/gp/offer-listing/0750685344/ref=dp_olp_all_mbc?ie=UTF8&qid=1307884045&sr=1-2-catcorr&condition=all

Doing IO on the GPIO pins is fairly similar to most other platforms, perhaps some books on Embedded programming, platforms, interfacing, techniques, etc might be more helpful than stuff specifically about the STM32

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
vikas_sinha75
Associate II
Posted on July 06, 2011 at 08:32

SImply go through the std peripheral library example avaialble at

http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=FIRMWARE&ClassID=1734

. you will get example of most of the peripherals. For more details go through HW CONFIG function under each example carefully all the initiallization etc is availble under this.

Simply download the firmware from internet and look into the library folder. you will get the desired things over there

Andrew Neil
Evangelist III
Posted on July 06, 2011 at 08:45

''basic programming techniques on STMs''

 

Basic programming techniques will be the same whatever microcontroller you're using.

Keil (an ARM company) give a good list of general embedded progamming books:

http://www.keil.com/books

 - they are not (all) specific to the Keil tools!

The things that are specific to the STM32 are to do with its hardware implementation - which is described in the User Manual.

See the 'Resources' tab at 

http://www.st.com/stm32

for all the documentation - including Datasheets, Reference Manuals, Application Notes, etc,...

Also see this recent thread on the forum: 

http://bit.ly/qZ7Vpv