Jump to content
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...