Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:43 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Picomite bootup time

     Page 1 of 2    
Author Message
apalert
Newbie

Joined: 06/07/2023
Location: Australia
Posts: 15
Posted: 05:18am 26 Feb 2024
Copy link to clipboard 
Print this post

With Micromite Explore 28 I find time to bootup and run a program is a fraction of a second with either USB or battery power.

With my Picomite it takes about 2 seconds on USB power or 5 seconds on battery.

Does that seem normal?
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 06:17am 26 Feb 2024
Copy link to clipboard 
Print this post

Yes.

With the PicoMite or PicoMite VGA, all of MMBASIC is stored in the external QSPI memory chip.  At boot-up, the 2040 chip copies key sections of the MMBASIC interpreter into the 2040's RAM, then starts the interpreter.

You need to wait a few seconds with the Pico-based ports, for the chip to "Boot" vs the PIC32-based ports of MMBASIC, which start instantly.

It is done this way, due to lack of memory resources on the RP2040 chip vs the memory available on the PIC32 series of chips.

Perfectly normal - and unavoidable, before you ask!  
Smoke makes things work. When the smoke gets out, it stops!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 08:01am 26 Feb 2024
Copy link to clipboard 
Print this post

Hello everyone - after a much needed break, I am back!!!

This ‘delayed’ startup time confused me at first but I was determined to solve it  

If you enable the  Serial-Console option (ie as if you’re going to talk via an external usb-to-uart module), you’ll see the Pico start up almost instantly.

I can only assume the startup routine is looking for a confirmed console connection via the Pico’s usb port; you can see this ‘delay’ if your terminal app isn’t running when you connect the Pico to your computer (and the Pico is controlling some kind of visual or audible device so you know when it has eventually started).

I have several battery powered standalone Pico’s with  OPTION SERIAL CONSOLE …. set, and with the ability to  plug in an HC05 Bluetooth module should I need to program the Pico……

Hope this helps 👍
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 08:48am 26 Feb 2024
Copy link to clipboard 
Print this post

hi WhiteWizzard.
   is really good to see you are back and ok.


cheers,
rob   :-)
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 858
Posted: 10:07am 26 Feb 2024
Copy link to clipboard 
Print this post

  WhiteWizzard said  after a much needed break, I am back!!!



Huh? A "break" for me is getting rid of people so that I can get back to playing with Mites  

Really great to see you back  
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 10:11am 26 Feb 2024
Copy link to clipboard 
Print this post

Focussing on the original question; can I just confirm that my answer was related to a standard PicoMite - I have not tried this on the vga or web versions of the Pico.
Can anyone else confirm if setting OPTION SERIAL CONSOLE speeds up these boot times too (assuming they are also ‘delayed’ when not connected to a terminal app!)

Thanks
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
apalert
Newbie

Joined: 06/07/2023
Location: Australia
Posts: 15
Posted: 10:34am 26 Feb 2024
Copy link to clipboard 
Print this post

Thanks Grogster, good to know it wasn't my fault :)
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6787
Posted: 10:44am 26 Feb 2024
Copy link to clipboard 
Print this post

Hiya WW! Great to see you back. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
apalert
Newbie

Joined: 06/07/2023
Location: Australia
Posts: 15
Posted: 10:48am 26 Feb 2024
Copy link to clipboard 
Print this post

Yes, standard Picomite. It's a huge improvement, many thanks :)

With USB power it boots in well under 1 second. On batteries bootup seems to be now about 1 second. I can live with that, was planning for user to hold in rotary encoder switch 1 second to boot the device so will probably make my coding easier!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2817
Posted: 10:58am 26 Feb 2024
Copy link to clipboard 
Print this post

  apalert said  Thanks Grogster, good to know it wasn't my fault :)


…..but do try setting OPTION SERIAL CONSOLE to speed it up (refer to the User Manual for the 2 (or3) required parameter values)

SORRY - messages crossed as my webpage hadn’t refreshed
Edited 2024-02-26 21:01 by WhiteWizzard
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 858
Posted: 11:26am 26 Feb 2024
Copy link to clipboard 
Print this post

FWIW: ARMmite H7 is serial console and boots <1sec

H7 is  
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 11:29am 26 Feb 2024
Copy link to clipboard 
Print this post

Welcome back to the fold Phil,

Regards,

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 09:01pm 26 Feb 2024
Copy link to clipboard 
Print this post

I will have to have a play about with a Pico module now, cos it seems I might have put you crook!    

My reply was pretty much a copy/paste of an answer to a similar question I asked a while back.

Put an LED on an I/O pin, write a single line of code to make that pin high.
Plug in the power to the Pico, time how long it takes for the LED to light - it's always been about six seconds for me....Pico OR PicoVGA.

Now I have to experiment!

Oh, and also fantastic to see you back on the forums WW - I think we all thought we had lost you to other projects and you might not be back, so good to see you back again.  
Smoke makes things work. When the smoke gets out, it stops!
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 284
Posted: 12:20pm 27 Feb 2024
Copy link to clipboard 
Print this post

I've just tried this on a standed PicoMite and the boot up time is amazing.

OPTION SERIAL CONSOLE GP4,GP5,B

Dave.

ps. Welcome back Phil.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 12:50pm 27 Feb 2024
Copy link to clipboard 
Print this post

#ifndef USBKEYBOARD
   if(!(Option.SerialConsole==1 || Option.SerialConsole==2) || Option.Telnet==-1) while (!tud_cdc_connected() && mSecTimer<5000) {}
#endif
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 06:37am 28 Feb 2024
Copy link to clipboard 
Print this post

WTF?!  

This is why I refuse to deal with C....


Utterly confusing, syntax wise.  

But again - that is only cos I don't code in C, cos I don't understand C.

Edited 2024-02-28 16:38 by Grogster
Smoke makes things work. When the smoke gets out, it stops!
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 08:33am 28 Feb 2024
Copy link to clipboard 
Print this post

  Quote  This is why I refuse to deal with C....


Basic C syntax maps 1:1 onto MMBasic

if NOT(Option.SerialConsole=1 OR Option.SerialConsole=2) OR Option.Telnet=-1) then do while ( NOT tud_cdc_connected() AND mSecTimer<5000) : LOOP


If there isn't a serial console or a telnet console specified then wait for a USB CDC connection for a maximum of 5 seconds
Edited 2024-02-28 18:35 by matherp
 
apalert
Newbie

Joined: 06/07/2023
Location: Australia
Posts: 15
Posted: 08:58am 28 Feb 2024
Copy link to clipboard 
Print this post

  matherp said   If there isn't a serial console or a telnet console specified then wait for a USB CDC connection for a maximum of 5 seconds


So there is 5 second boot time on battery power cited in my original post.

Does the delay have to be that long? If booted from USB it is there from the get go so why not loop for say just 1 second?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6787
Posted: 01:50pm 28 Feb 2024
Copy link to clipboard 
Print this post

Only guessing...
Probably because the three tests are very fast. Windows needs time to recognise an attached device before creating a virtual COM port and connecting to it. It may not be able to do that within a second.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 09:29pm 28 Feb 2024
Copy link to clipboard 
Print this post

Agreed.

And does indeed seem I was wrong and putting you crook on my first reply - sorry about that.  

According to what has been discussed in this thread, if you define the console to some pins on the Picomite, then this delay is essentially elimionated completely - not to paraphrase an earlier post from another member that pretty much states the same thing.

I was unaware of this.
But now that I know, I think I will still just use as-is, cos it is really convenient to be able to use the 2040 USB VCP, and 5-6 seconds is of no concern - TO ME.

But I can see it might be a nuisance to some members, and so in that case, setup some console pins as part of the process, and things should start more-or-less instantly.

Good to know!  
Smoke makes things work. When the smoke gets out, it stops!
 
     Page 1 of 2    
Print this page
© JAQ Software 2024