0

Trinket M0 starts main.py only in USB conn mode
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trinket M0 starts main.py only in USB conn mode

by plodozhor on Tue May 11, 2021 9:10 am

Hello!

I experience strange behaviour. Actually I experienced it from the very beginning but did not pay attention. So, my Trinket M0 executes its main.py program only when it is connected to a USB host.

In other words:
a) Trinket M0 - 20 mm battery = main.py does not start. Lights are on but nothing happens.
b) Trinket M0 - USB cable - Power socket = main.py does not start. Lights are on but nothing happens.
c) Trinket M0 - USB cable - iPad = main.py starts succesfully.

What could be the reason?

plodozhor
 
Posts: 12
Joined: Tue Feb 02, 2021 10:11 am

Re: Trinket M0 starts main.py only in USB conn mode

by plodozhor on Tue May 11, 2021 10:17 am

FYI: file boot_out.txt says CircuitPy version is 3.1.1 on 2018-11-02; samd21e18

Looks like the CIRCUITPY drive is active only when mounted as filesystem to iOS or Windows device, which automatically means /CIRCUITPY/main.py is inaccessible otherwise.

Also, the Dotstar light behaves differently. When M0 is connected to battery, it emits pink and when connected to USB power socket it emits blue+green.

plodozhor
 
Posts: 12
Joined: Tue Feb 02, 2021 10:11 am

Re: Trinket M0 starts main.py only in USB conn mode

by plodozhor on Wed May 12, 2021 3:10 am

Is my Trinket faulty and I have to send it back or there is a way to remediate it?

plodozhor
 
Posts: 12
Joined: Tue Feb 02, 2021 10:11 am

Re: Trinket M0 starts main.py only in USB conn mode

by adafruit_support_carter on Wed May 12, 2021 1:45 pm

It may have something to do with the actual code in main.py. But first, let's update the firmware on the Trinket. The 3.11 version of CircuitPython is pretty old at this point.

Make a backup of any code you have stored on your Trinket. Like your main.py file.

Then, grab the latest firmware UF2 file from here:
https://circuitpython.org/board/trinket_m0/

And the latest library bundle from here:
https://circuitpython.org/libraries

Once everything is updated, see if you get the same behavior. Also try with a simple LED blink as your main.py.

adafruit_support_carter
 
Posts: 20355
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trinket M0 starts main.py only in USB conn mode

by plodozhor on Fri May 14, 2021 3:00 am

Thanks a lot! Will do as you instructed. Is it possible to flash newer CircuitPy only using a PC or iPad/iPhone will work as well?

plodozhor
 
Posts: 12
Joined: Tue Feb 02, 2021 10:11 am

Please be positive and constructive with your questions and comments.