Metro M4 Grand Central - Arduino/PlatformIO upload without double press reset?

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Mr6510
 
Posts: 23
Joined: Tue Aug 21, 2018 6:19 am

Metro M4 Grand Central - Arduino/PlatformIO upload without double press reset?

Post by Mr6510 »

Hi,
I have a few of your awesome GCM4's and a bunch of Feather M4 CAN Express boards. I don't use CircuitPython, only PlatformIO/Arduino IDE.

Sometimes I can upload from PIO/ArduinoIDE without needing to manually do the double press of the RESET button, but most of the time it fails unless I do the double RESET first. I can't pick what makes it sometimes work on the odd occasion that it does.

I have read all of your descriptions of the UF2 boot loaders etc at https://learn.adafruit.com/adafruit-gra ... l?view=all and from what I can gather, once I have uploaded one Arduino sketch, I should no longer need to do the double RESET next time I want to upload another Arduino sketch. In particular there is one line in there
Once Blink is uploaded you should no longer need to double-click to enter bootloader mode. Arduino will automatically reset when you upload.
So is there something I am missing, is there any change I can make in terms of the boot loader or QSPI Flash such that it works automatically every time with Arduino IDE upload, without having to do the manual double RESET process?

I use a Mac, and have been for 2-3 yrs with these boards, I don't think the behaviour is related to macOS versions, its always been this way.

Using the standard blink.ino here is what it looks like when the upload from ArduinoIDE works, without me double pressing RESET...

Code: Select all

Sketch uses 12296 bytes (1%) of program storage space. Maximum is 1032192 bytes.
Device       : ATSAMD51x20
Version      : v1.1 [Arduino:XYZ] Jan 15 2022 11:54:30
Address      : 0x0
Pages        : 2048
Page Size    : 512 bytes
Total Size   : 1024KB
Planes       : 1
Lock Regions : 32
Locked       : none
Security     : false
BOD          : false
BOR          : true
Write 12552 bytes to flash (25 pages)
[==============================] 100% (25/25 pages)
Done in 0.251 seconds
Verify 12552 bytes of flash
[==============================] 100% (25/25 pages)
Verify successful
Done in 0.355 seconds

Here's what often happens when it hangs and fails to upload (which is what happens most of the time)...

Code: Select all

Sketch uses 12296 bytes (1%) of program storage space. Maximum is 1032192 bytes.
Device       : ATSAMD51x20
Version      : v1.1 [Arduino:XYZ] Jan 15 2022 11:54:30
Address      : 0x0
Pages        : 2048
Page Size    : 512 bytes
Total Size   : 1024KB
Planes       : 1
Lock Regions : 32
Locked       : none
Security     : false
BOD          : false
BOR          : true
Write 12552 bytes to flash (25 pages)
[=========                     ] 32% (8/25 pages)
An error occurred while uploading the sketch
SAM-BA operation failed
The GCM4 is then sitting with all LED's (ON, TX, RX, L) on, and the NeoPixel solid green.

If I don't touch the GCM4 and try again to upload after the previous one failed, this is what happens...

Code: Select all

Arduino: 1.8.19 (Mac OS X), Board: "Adafruit Grand Central M4 (SAMD51), Enabled, 120 MHz (standard), Small (-Os) (standard), 50 MHz (standard), Arduino, Off"

Sketch uses 12296 bytes (1%) of program storage space. Maximum is 1032192 bytes.
Couldn't find a Board on the selected port. Check that you have the correct port selected.  If it is correct, try pressing the board's reset button after initiating the upload.
Board at /dev/cu.usbmodem21401 is not available

The only way to get going again is to do the double RESET and try another upload.

Thanks very much :)
Paul

User avatar
Mr6510
 
Posts: 23
Joined: Tue Aug 21, 2018 6:19 am

Re: Metro M4 Grand Central - Arduino/PlatformIO upload without double press reset?

Post by Mr6510 »

I forgot to add, this is particularly challenging once the board is inside a project, either I have to get physical access to it every time OR I extend an extra RESET button out to where I can access.
Hopefully there is a solution to avoid needing to double press RESET that I just haven't found. 👍
Thanks,
Paul

User avatar
Mr6510
 
Posts: 23
Joined: Tue Aug 21, 2018 6:19 am

Re: Metro M4 Grand Central - Arduino/PlatformIO upload without double press reset?

Post by Mr6510 »

I also forgot to add I'd love to get rid of the "Disk Not Ejected Properly....." pop ups as well. I know they don't indicate an issue, but if I could not have the board not show up as a device/disk at all that would be super awesome.
Thanks,
Paul

Locked
Please be positive and constructive with your questions and comments.

Return to “Metro, Metro Express, and Grand Central Boards”