Metro M4 Express serial (yet again)

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
ewhansen
 
Posts: 33
Joined: Tue Feb 12, 2019 3:18 pm

Metro M4 Express serial (yet again)

Post by ewhansen »

I have seen related posts on this forum, but I don't yet have a complete picture of how things are supposed to work. Please pardon the repetition.

I am using a Metro M4 Express (bootloader 3.14.0), with Arduino IDE 2.0.3 on MacOS 12.6.2 (Monterey). USB cable is known good. Earlier this week, I plugged the board in to the Mac and observed that it was assigned a /dev/cu.usbmodemxxxxx port. I was able to compile and upload the Blink demo with the Arduino IDE.

Sometime later, as I was tinkering with a command-line compile and upload outside the Arduino IDE (virtually the same commands that are issued by the IDE, according to the verbose output), the board ceased to be recognized, and uploads failed. Now, if I double-reset the board to enter the bootloader mode, the board is recognized and assigned a port, visible in /dev. I can now upload with the Arduino IDE but as soon as the upload finishes, the IDE disconnects from the board, and the entry in /dev also disappears. Likewise, the command-line method also works after the double-reset, and then the board disconnects. If I double-reset the board and re-enter the bootloader, I'm back in business. But the auto-recognition that I had before no longer works.

Unplugging/replugging the USB, and rebooting the computer both fail to make a difference. I have not tried to reload the bootloader (UF2 file), because it is the current version and seems to be otherwise doing its job.

Is there a way to get myself back to where the board is auto-recognized when it's plugged in? Thank you.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Metro M4 Express serial (yet again)

Post by mikeysklar »

With the M0 and M4 based boards I have needed to use manual bootloader to upload from the Arduino-IDE or arduino-cli.

There is a work around to manually trigger bootloader from your computer by initiating a 1200 baud serial connection to the comms port and then closing it. You should still see a comms port when connected to USB in you /dev folder.

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: Metro M4 Express serial (yet again)

Post by adafruit_support_carter »

I can now upload with the Arduino IDE but as soon as the upload finishes, the IDE disconnects from the board, and the entry in /dev also disappears.
At this point what was the sketch being uploaded? Try the basic Blink example and see if that fixes the general behavior. What's being described can often be attributed to the sketch code itself. But basic Blink *should* be a safe easy test sketch that won't do this.

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

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