curiosity 1 Posted October 20, 2015 Share Posted October 20, 2015 I have a MSP430G2553 on a breadboard, loaded with a very simple Energia program. It is running at 1MHz with the internal oscillator. There is nothing attached to the reset pin. The program runs properly. But there is a 2.5 sec delay between the 3.3 volt supply coming up and the execution of the first line of the program (simply raising an output pin). That seems like a very long time. Is this normal? Is it due to hardware sequences on the chip or is it caused by Energia? Quote Link to post Share on other sites
roadrunner84 466 Posted October 20, 2015 Share Posted October 20, 2015 Note that all global variables and objects, as well as a tiny bootstrap are run before the first line in your setup() or main() routine. So if you have a TCP/IP object in global space that tries to get an IP over DHCP, you might end up with several seconds of delay before the MCU enters the setup() or main(). Quote Link to post Share on other sites
32xan 1 Posted October 20, 2015 Share Posted October 20, 2015 > There is nothing attached to the reset pin. Always connect a pull-up resistor (47k?) and a pull-down capacitor (2.2nF) to reset ( that's form roadrunner's post) Quote Link to post Share on other sites
yosh 121 Posted October 20, 2015 Share Posted October 20, 2015 I noticed this behaviour when using larger caps (e.g. larger than 1 uF) for the LDO voltage regulator on my custom boards ... what kind of power supply do you use? Quote Link to post Share on other sites
curiosity 1 Posted October 20, 2015 Author Share Posted October 20, 2015 I use a standard 78L3.3 regulator for the supply. No large capacitor. It comes up to full voltage in less than 1msec. It is my understanding that the reset pin has an internal pullup. Anyhow, when I add an external resistor and capacitor as recommended, the results are exactly the same. For this test, I reduced my program to absolute minimum, just blinking one LED. No connections to the outside world. The 2.5 sec delay is enough for many thousands of instructions. Does the Energia core really have that much setup work to do? I would expect a few msecs at most. Does anyone else have a measurement of their power up delay in similar circumstances? Quote Link to post Share on other sites
chicken 630 Posted October 20, 2015 Share Posted October 20, 2015 Energia has a few timeouts while waiting for the optional external XTAL to spin up. According to the comments in wiring.c, the timeout is 2 seconds. https://github.com/energia/Energia/blob/master/hardware/msp430/cores/msp430/wiring.c (Line 80 or thereabouts) curiosity, reaper7, yosh and 2 others 5 Quote Link to post Share on other sites
curiosity 1 Posted October 20, 2015 Author Share Posted October 20, 2015 chicken, you have solved the mystery. Thankyou. tripwire 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.