Jump to content
Forum sending old emails Read more... ×
Sign in to follow this  
Peabody

How does Energia intialize a G2553?

Recommended Posts

This is my first attempt with Energia.  Sorry to ask so many questions.  I need to know what state the G2553 is left in after whatever Energia does to it automatically so I know what I need to do, such as:

Does it set the top of the stack?

Does it set the clock to 1 MHz?  8 MHz?

Does it disable the watchdog function?

Does it return P2.6 and P2.7 to GPIO use?

Does it leave all port pins as inputs with PU resistors?

Does it set up a timer to generate interrupts for millis()?

Also, where can I find this kind of information?  I didn't have any luck searching for it here, or on the .nu site.

Thanks

 

Share this post


Link to post
Share on other sites

Since all the code of the Energia SDK is open source, you can dive into the files to analyse the initialisation routine.

Similarly, you can use a debugger to check the executable, the assembler and the registers.

Share this post


Link to post
Share on other sites
On 12/23/2018 at 6:15 PM, Peabody said:

This is my first attempt with Energia.  Sorry to ask so many questions.  I need to know what state the G2553 is left in after whatever Energia does to it automatically so I know what I need to do, such as:

Does it set the top of the stack?

Does it set the clock to 1 MHz?  8 MHz?

Does it disable the watchdog function?

Does it return P2.6 and P2.7 to GPIO use?

Does it leave all port pins as inputs with PU resistors?

Does it set up a timer to generate interrupts for millis()?

Also, where can I find this kind of information?  I didn't have any luck searching for it here, or on the .nu site.

Thanks

What I've found is that it turns off Watchdog, sets the stack pointer to the top of ram, sets the clock to 16 MHz, and restores P2.6 and P2.7 to GPIO use if there's no crystal on those pins.  Couldn't find anything else on the ports beyond their normal boot state.  Also couldn't find the timer thing, but it must set that up to be able to do millis.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×