ItsyBitsy M0 filesystem problem?

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
Elektrix
 
Posts: 19
Joined: Wed Dec 26, 2018 6:11 am

ItsyBitsy M0 filesystem problem?

Post by Elektrix »

Hello all,

some weeks ago I bought two ItsyBitsy M0 Express from a German dealer. They both show the same problem. They came with an old version of CircuitPython (I don't remember) and Bootloader 3.7.0. After updating CircuitPython to 7.3.1 the CIRCUITPY drive didn't show up as CIRCUITPY but as 4921-8571.

Anyway, I started developing my code and after a while I realized that the filesystem was corrupted. Then I did a filesystem erase via the REPL console and the drive name changed to CIRCUITPY :-)

After some further programming work the board suddenly went into Safe mode and told me that it crashed into the Hardfault_Handler.

A second filesystem erase brings no change. The second board shows the same effects.

Now I don't know if this is a hardware problem specific to a certain lot or a problem of CircuitPython 7.3.1. Attached is a picture of the bag of one of the boards so you can see the lot No.

For the moment I continue my development on a Feather M0 Express with CircuitPython 7.3.0 that seems to work

Can anyone give me further info about what the problem is and how to solve it? Any help is very much appreciated.

Elektrix
Attachments
ItsyBitsy.jpg
ItsyBitsy.jpg (64.37 KiB) Viewed 282 times

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: ItsyBitsy M0 filesystem problem?

Post by dastels »

Did you update the bootloader to 3.14.0?

Dave

User avatar
Elektrix
 
Posts: 19
Joined: Wed Dec 26, 2018 6:11 am

Re: ItsyBitsy M0 filesystem problem?

Post by Elektrix »

No I didn't. I would do so if you'd advise me to.

Elektrix

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: ItsyBitsy M0 filesystem problem?

Post by dastels »

It's old enough that I would try it. See the instructions/link at the bottom right of https://circuitpython.org/board/itsybitsy_m0_express/.

Dave

User avatar
Elektrix
 
Posts: 19
Joined: Wed Dec 26, 2018 6:11 am

Re: ItsyBitsy M0 filesystem problem?

Post by Elektrix »

After updating the bootloader to 3.14.0 the board stays in boot mode (drive ITSYBOOT is visible) and returns in this mode after reset. When I upload CircuitPython 7.3.1 (filename adafruit-circuitpython-itsybitsy_m0_express-de_DE-7.3.1.uf2) the CIRCUITPY drive appears again and the old files in this drive are still visible. BUT: the board goes to Safe mode again with tha Hardfault_Handler. Then I reduced the code.py file to one single line: print("Hello") and it worked. Then I added a second line: import time and got Errno 5. After deleting this second line again I got Errno 5 again. It also looks like renaming a file sometimes crashes the file (file length 0 afterwords) but this is not reproducible. To me this looks like the filesystem or the whole system is not in a stable state.

Elektrix

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: ItsyBitsy M0 filesystem problem?

Post by dastels »

It sounds like you've consulted https://learn.adafruit.com/welcome-to-c ... es-2978456 already.

Dave

User avatar
Elektrix
 
Posts: 19
Joined: Wed Dec 26, 2018 6:11 am

Re: ItsyBitsy M0 filesystem problem?

Post by Elektrix »

Yes that's true. But it looks like the filesystem is still corrupted after reloading CircuitPython. I have no idea how to fix this. For the moment I continue on my Feather M0 Express with CP 7.3.0 which is working stable but in the end I would like to use the ItsyBitsy.

Elektrix

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: ItsyBitsy M0 filesystem problem?

Post by dastels »

I asked internally to see if anyone has seen this sort of thing.

Dave

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: ItsyBitsy M0 filesystem problem?

Post by adafruit2 »

did you run the storage erase command ?
https://learn.adafruit.com/welcome-to-c ... em-2987288
you probably need to do that

User avatar
Elektrix
 
Posts: 19
Joined: Wed Dec 26, 2018 6:11 am

Re: ItsyBitsy M0 filesystem problem?

Post by Elektrix »

Now I am able to reproduce the error. On my ItsyBitsy M0 Express I have the bootloader 3.14.0 and CircuitPython 7.3.1 on 2022-06-22 (German language version).

From the REPL I do:

Code: Select all

import storage
storage.erase_filesystem()
From the adafruit CircuitPython bundle (extracted from adafruit-circuitpython-bundle-7.x-mpy-20220708.zip) I copy the libraries adafruit_bus_device and adafruit_mcp230xx into the lib folder.

I copy two files onto the ItsyBitsy.

The file with the name code.py goes into the main folder:

Code: Select all

import test
The file with the name test.py goes into the lib folder:

Code: Select all

import time
import board
import digitalio
from audiocore import RawSample
# from adafruit_mcp230xx.mcp23017 import MCP23017
Until here everything is ok. Now I uncomment the last line of test.py and the system crashes with a Hardfault Handler error.

After that you can start again with import storage and storage.erase_filesytem() and have the same behaviour again.

This is the same when a MCP23017 is connected or not. I did it before with the CircuitPython bundle release 20220704 with the same result.

I absolutely have no idea what is going on there. Any help is very much appreciated!

Elektrix

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: ItsyBitsy M0 filesystem problem?

Post by adafruit2 »

ok i think thats actually unrelated to filesystem. it might actually be you running out of memory in a wierd way (it shouldnt hardfault tho)
first up, try "absolute latest" circuitpy 8.x - and paste the REPL outptu here :)

User avatar
Elektrix
 
Posts: 19
Joined: Wed Dec 26, 2018 6:11 am

Re: ItsyBitsy M0 filesystem problem?

Post by Elektrix »

I downloaded CircuitPython 8.0.0-alpha.1 for ItsyBitsy M0 Express German version and installed it. Then I did erase_filesystem() via REPL. Then I uploadad the same libraries as before but in the 8.x version from adafruit-circuitpython-bundle-8.x-mpy-20220708.zip and my two files as described before. Same result :-(

Elektrix

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: ItsyBitsy M0 filesystem problem?

Post by adafruit2 »

ok can ya open up a github issue on https://github.com/adafruit/circuitpython
with the exact files/REPL output?

User avatar
Elektrix
 
Posts: 19
Joined: Wed Dec 26, 2018 6:11 am

Re: ItsyBitsy M0 filesystem problem?

Post by Elektrix »


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

Return to “Itsy Bitsy Boards”