Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

STM32F103RB Tutorial.

Status
Not open for further replies.

djc

Advanced Member level 1
Joined
Jan 27, 2013
Messages
402
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
India
Activity points
4,554
Hi,
I have to start working on STM32F103Rb cortex m3 processor with KEIL5. I have nucleo board. I have searched internet but found nothing useful. I am working with C language. I am not getting what are the input output registers and how to configure them in keil. I tried one small program for LED blinking but not working. As this is very new controller for me, i am unable to recognize the fault. Moreover KEIL5 shows red cross mark on "stm32f10x.h" include file but after compiling it shows no error or warning regarding the same. Do somebody have some piece of simple codes for the said microcontroller.
 

First of all, you should start reading reference manual for STM32F10x. It is common manual for all Cortex M3 family.
Then you should compile your first project. You will need a main header file stm32f10x.h, it have to be included in keil installation package.
Then don't forget to add startup file, switch on clock to GPIOx registers group and only then change a pin state with ODR/IDR or BSSR/BSR registers.
 

Thanx easyrider n chandu,
What is CUBEMx software. Moreover KEIL5 shows 'RED CROSS' on "#include "stm32f10x.h"" header file. Why it is so?
 

There is a difference between the IDE and the compiler: the red cross you are seeing is generated by the IDE and tells you that, for whatever reason, the IDE cannot find the file (or perhaps some other file that it includes). This would normally indicate that the IDE has not been set up correctly.
You say that the compiler does not report any errors. That means that the compiler IS set up correctly and it can find the include file. In the end, the compiler is the one that has to be happy with your source code as it will be generating the binary that is executed.
I was also going to suggest the CubeMX software - look on the ST web site or google for stmcube (or stmcubemx).
Susan
 

i think IAR compiler is more easy, They have a lot of sample codes.
 

Keil also have a lot of examples. Even more - there are thousands of project available for keil in google. But asking on forum is a much easiest way don't you think?
 

Thanx everyone. I was familiar with KEIL. So started working with version 5. Haven't heard about other compilers. If IDE is different, then how to let IDE know about that include file.
 

How can you be familiar with keil, if you don't know how to specify the path where compilier will search for the files?
 

I haven't confronted with similar problem till now, that's why i said that. Worked with keil on 8051. I haven't faced any such issue with that. I don't know any other version however the one i used earlier even had no libraries for ADC or delay.
 

There nothing common between 8051 keil and keil for ARM. Anyway, this file should be included in project folder or can be accessed in standart folder for header files. All this folders are listed during compilation in error output window.
 

Here is the screen shot for the compiler. All files are included in the source group 1. Whereelse i have to include them again.
cortex.png
 

I don't see compilation log with errors. But anyway, you forgot to switch on RCC and configure the pins for output push-pull.
All this things can be done by STM32_Init file, provided by keil. You using it, but commented.
 

yes rider, i commented it because it was giving error. As you can see, there is red cross on #include<stm32f10x.h> file, though it has been included in project on left side. Moreover why there are yellow marks on all the header files except <stdio.h> file
 

That's because keil's stm32_Init doesn't work together with ST's SPL
But this can be fixed manually. This is for advanced users. You better start using SPL.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top