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.

Microcontroller execution control flow

Status
Not open for further replies.

thangaduraibeece

Junior Member level 2
Joined
Jul 4, 2008
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,419
Hi,
I have a basic doubt with microcontroller.
When i power on the microcontroller,the first code executing will be the startup code (provided by compiler or created by user) or any other in-built micro code before issuing the control to the user.
 

If your micro have a built in bootloader (like LPC2106 from NXP) the first task that take on execution will be the bootloader, if no programming request is asserted execution going to the startup procedure and then your program.

Bye
Powermos
 

Hi,
How can i know that my micro has inbult bootloader or something?
Whether the micro datasheet has that information?
 

Look in the data sheet. Some micros (like AVR) expect you to write your own boot loader. They just provide the space and the option to execute your code at reset. What micro do you have? Regarding what is executed first... most compilers will put some code in front of your code to initialize variables etc.
 

Actually am using AVR controller and also Infineon.
What i am doubting in that is, in both the controller i am writing my code form the reset vector location.
 

My previous comment was if you are using a C compiler. I am not sure what an assembler does. With the AVR you have to set the BOOTSZ fuse to set the size of the boot area. You then write your own boot loader and at reset the AVR will try run your code first.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top