micropython_eeprom Library - OSError 19 mounting external FLASH

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
ExDes
Posts: 8
Joined: Thu Apr 29, 2021 10:25 pm

micropython_eeprom Library - OSError 19 mounting external FLASH

Post by ExDes » Fri Dec 10, 2021 7:39 pm

Hello all,
I am attempting to mount a set of three S25FL128L FLASH devices on a NUCLEO-F767ZI board using the library micropython_eeprom. All seems to go well until I attempt to mount the devices, and then receive an error code 19, "No such device". Code as follows:

Code: Select all

>>> import os
>>> from machine import SPI, Pin
>>> from flash_spi import FLASH
>>> cspins = (Pin(Pin.cpu.A4, Pin.OUT, value=1), Pin(Pin.cpu.A15, Pin.OUT, value=1), Pin(Pin.cpu.C7, Pin.OUT, value=1))
>>> flash = FLASH(SPI(3, baudrate=20_000_000), cspins)
3 chips detected. Total flash size 48MiB.
>>> os.VfsFat.mkfs(flash)
>>> os.mount(flash,'/fl_ext')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 19] ENODEV
I run into the same problem if specifying only one single device. If I access a single byte in each device, all seems to go well:

Code: Select all

>>> flash[2000] = 42
>>> print(flash[2000])
42
>>> flash[20000000] = 21
>>> print(flash[20000000])
21
>>> flash[40000000] = 64
>>> print(flash[40000000])
64
I have spent a great deal of time on this, and any help would be much appreciated.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: micropython_eeprom Library - OSError 19 mounting external FLASH

Post by pythoncoder » Sat Dec 11, 2021 9:42 am

The S25FL128L is one of the devices I have tested thoroughly on Pyboard and ESP32 hosts. I don't have a NUCLEO-F767ZI board so I can't replicate your results.

Have you run the test script flash/flash_test.py? I suggest you do. You'll need to adapt the very start of the code to match your hardware. Run test() and, if this is OK, full_test(count=10). If that passes your hardware is OK. Then run fstest(format=True) to create the filesystem. If that succeeds the filesystem will be mounted on /fl_ext.

If fstest fails I suspect a firmware problem on the Nucleo.
Peter Hinch
Index to my micropython libraries.

Post Reply