pyboard 1.1, sd card, and ENODEV error

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
hybotics
Posts: 33
Joined: Tue Apr 03, 2018 2:58 am
Contact:

pyboard 1.1, sd card, and ENODEV error

Post by hybotics » Mon Mar 11, 2019 9:11 pm

Hi,

My pyboard v1.1 is booting from a 16Gb Sandisk sd card now. I am getting the ENODEV error on known good code. Resetting the file system to factory defaults will not help according to the documentation, because it does not reset the sd card file system. This is with Micropython v1.10.

Is there any reason it could not reset the sd card if the pyboard is booting from one?

8-Dale

rhubarbdog
Posts: 168
Joined: Tue Nov 07, 2017 11:45 pm

Re: pyboard 1.1, sd card, and ENODEV error

Post by rhubarbdog » Tue Mar 12, 2019 8:25 am

Have you tried re formatting the disk?

Certain bugs in your code can corrupt the SD card.
Try os.listdir('/sd') in a REPL session are there any garbage filenames?

rhubarbdog
Posts: 168
Joined: Tue Nov 07, 2017 11:45 pm

Re: pyboard 1.1, sd card, and ENODEV error

Post by rhubarbdog » Tue Mar 12, 2019 9:27 am

Are you sure it's not executing boot.py from flash?
Add a print statement to the boot.py on flash. And do a soft reboot in a REPL session.

hybotics
Posts: 33
Joined: Tue Apr 03, 2018 2:58 am
Contact:

Re: pyboard 1.1, sd card, and ENODEV error

Post by hybotics » Tue Mar 12, 2019 4:58 pm

rhubarbdog wrote:
Tue Mar 12, 2019 9:27 am
Are you sure it's not executing boot.py from flash?
Add a print statement to the boot.py on flash. And do a soft reboot in a REPL session.
I did. It is executing boot.py from the sd card. Now, I will reformat the sd card and see if that helps.

8-Dale

hybotics
Posts: 33
Joined: Tue Apr 03, 2018 2:58 am
Contact:

Re: pyboard 1.1, sd card, and ENODEV error

Post by hybotics » Tue Mar 12, 2019 6:55 pm

rhubarbdog wrote:
Tue Mar 12, 2019 8:25 am
Have you tried re formatting the disk?
Yes. My PyBoard boots from the sd.
rhubarbdog wrote:
Tue Mar 12, 2019 8:25 am
Try os.listdir('/sd') in a REPL session are there any garbage filenames?
os.listdir('/sd') shows the correct listing, and there are no garbage filenames.

8-Dale

rhubarbdog
Posts: 168
Joined: Tue Nov 07, 2017 11:45 pm

Re: pyboard 1.1, sd card, and ENODEV error

Post by rhubarbdog » Tue Mar 12, 2019 11:03 pm

Still getting OSError : ENODEV ?
If so post your code i'll see if i can help.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: pyboard 1.1, sd card, and ENODEV error

Post by Roberthh » Wed Mar 13, 2019 5:26 am

Do you have a main.py file on he sd card? If that is missing, you get an error on boot. You may ignore that, or create an empty main.py.

hybotics
Posts: 33
Joined: Tue Apr 03, 2018 2:58 am
Contact:

Re: pyboard 1.1, sd card, and ENODEV error

Post by hybotics » Wed Mar 13, 2019 5:19 pm

Roberthh wrote:
Wed Mar 13, 2019 5:26 am
Do you have a main.py file on he sd card? If that is missing, you get an error on boot. You may ignore that, or create an empty main.py.
I do have a main.py on the sd card, but there seems to be a bug in my code. This is a weird message to get for not being able to find an I2C device. I created a basic blink script and saved it to main.py and everything is fine.

8-Dale

rhubarbdog
Posts: 168
Joined: Tue Nov 07, 2017 11:45 pm

Re: pyboard 1.1, sd card, and ENODEV error

Post by rhubarbdog » Wed Mar 13, 2019 5:43 pm

Does i2c.scan() find this device?
Have you got the correct pull up resistors on SDA and SCL?

hybotics
Posts: 33
Joined: Tue Apr 03, 2018 2:58 am
Contact:

Re: pyboard 1.1, sd card, and ENODEV error

Post by hybotics » Wed Mar 13, 2019 7:13 pm

rhubarbdog wrote:
Wed Mar 13, 2019 5:43 pm
Does i2c.scan() find this device?
Have you got the correct pull up resistors on SDA and SCL?
What happened is that the SCL wire came unhooked at the PyBoard. That is when I got the ENODEV error. It is reproducible.

8-Dale

Post Reply