wagiminator / SAMD-Development-Boards

Collection of SAMD Development Boards, Programmers, Tools and Firmware
Other
26 stars 5 forks source link

Speed up boot/start up time #6

Open goseese opened 5 months ago

goseese commented 5 months ago

I have a paired down sketch that only inits a GPIO and set it high.

I have this flashed on a SAMD21E17A with crystal with no boot loader.

It seems to take about 2.3 seconds for the SAMD21E17A to start up and set the IO.

Is there anyway to speed this up to < 1 second?

wagiminator commented 4 months ago

I haven't really worked much with the SAMD, and even that was years ago. So, I can't help you off the cuff. Did you compile your code without the USB stack?

goseese commented 4 months ago

Hmm, that might be something to look at.

How do I compile it with out the USB stack?

On Fri, Apr 5, 2024 at 2:26 PM Stefan Wagner @.***> wrote:

I haven't really worked much with the SAMD, and even that was years ago. So, I can't help you off the cuff. Did you compile your code without the USB stack?

— Reply to this email directly, view it on GitHub https://github.com/wagiminator/SAMD-Development-Boards/issues/6#issuecomment-2040499703, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACB2NQZUDZTE5DYXOQKJHTY333HNAVCNFSM6AAAAABFWO6CK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBQGQ4TSNZQGM . You are receiving this because you authored the thread.Message ID: @.***>

goseese commented 4 months ago

Oh no, I see that option from the drop down. Sorry I should have at-least looked before I replied to that.

I will try that tomorrow when I am in the shop.

On Fri, Apr 5, 2024 at 3:05 PM Jeff Seese @.***> wrote:

Hmm, that might be something to look at.

How do I compile it with out the USB stack?

On Fri, Apr 5, 2024 at 2:26 PM Stefan Wagner @.***> wrote:

I haven't really worked much with the SAMD, and even that was years ago. So, I can't help you off the cuff. Did you compile your code without the USB stack?

— Reply to this email directly, view it on GitHub https://github.com/wagiminator/SAMD-Development-Boards/issues/6#issuecomment-2040499703, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACB2NQZUDZTE5DYXOQKJHTY333HNAVCNFSM6AAAAABFWO6CK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBQGQ4TSNZQGM . You are receiving this because you authored the thread.Message ID: @.***>

goseese commented 4 months ago

Compiling with USB off didn't effect the boot time. Thanks for your help on this tho. I will keep looking to see if there is somewhere I can reduce this time.

wagiminator commented 4 months ago

This is strange and shouldn't be like that. I suspect there is some overhead in the Arduino core.

goseese commented 2 months ago

Would you be interested in a paid contract to help me with this issue.

wagiminator commented 2 months ago

I'm sorry, I'm just a hobbyist with limited free time, so I generally don't do commissioned work.

goseese commented 2 months ago

I figured out the problem is related to the external crystal oscillator stabilization time. When I run the MCU on the internal clock option, execution starts in a few milliseconds.

js

On Sun, Jun 16, 2024 at 2:17 AM Stefan Wagner @.***> wrote:

I'm sorry, I'm just a hobbyist with limited free time, so I generally don't do commissioned work.

— Reply to this email directly, view it on GitHub https://github.com/wagiminator/SAMD-Development-Boards/issues/6#issuecomment-2171122943, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACB2NWPKJBLFBCGBJAH5BTZHU3YFAVCNFSM6AAAAABFWO6CK6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZRGEZDEOJUGM . You are receiving this because you authored the thread.Message ID: @.***>