Question about function of "AT91F_LowLevelInit()"

Guest #1171404
Rate this post
useful
not useful
Min Ge wrote:
> There is a funciton of "AT91F_LowLevelInit()" in Cstartup_SAM7.c.
> Do I have to call this function in the beginning of my main() function?
>
> I tried the two condition and can not tell the difference.

The function is used in the "Atmel-scheme" for startup-code. Atmel has
choosen a method to separate the startup in an assembler-part and a
C-part. This is rather convinient since as much as possible can be done
in C (the "Keil-Method" is to implement the startup in Assembler).
Additional the AT91-lib functions can be used. IRC the c-code sets up
the watchdog, system-clock and parts of the AIC so it is prefered to
call the function as early as possible.

If you'd like to follow the Atmel-Method look into the assembler-Code of
the examples which include a Cstartup.c. You will see at which stage the
function is called. For own developments: remind that a temporary stack
is set up before calling the c-Function, just use the examples as
templates.

Martin Thomas.
OP #1171405
Rate this post
useful
not useful
Martin Thomas wrote:
> Min Ge wrote:
>> There is a funciton of "AT91F_LowLevelInit()" in Cstartup_SAM7.c.
>> Do I have to call this function in the beginning of my main() function?
>>
>> I tried the two condition and can not tell the difference.
>
> The function is used in the "Atmel-scheme" for startup-code. Atmel has
> choosen a method to separate the startup in an assembler-part and a
> C-part. This is rather convinient since as much as possible can be done
> in C (the "Keil-Method" is to implement the startup in Assembler).
> Additional the AT91-lib functions can be used. IRC the c-code sets up
> the watchdog, system-clock and parts of the AIC so it is prefered to
> call the function as early as possible.
>
> If you'd like to follow the Atmel-Method look into the assembler-Code of
> the examples which include a Cstartup.c. You will see at which stage the
> function is called. For own developments: remind that a temporary stack
> is set up before calling the c-Function, just use the examples as
> templates.
>
> Martin Thomas.


Thanks a lot. I got it.

Min Ge

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now