External QSPI flash drive not mounting

I have installed OpenMV IDE: 4.0.12 on a macOS Ventura (13.2) and flashed the Arduino Giga R1 with OpenMV firmware v4.5.0. I am able to run example scripts from the IDE. However, I do not see any flash drive mounted. When I plug in the Giga R1 USB cable I see the message:
“The disk you attached was not readable by this computer”.

To test, I tried the Micropython firmware provided by Arduino and flashed it using the command: dfu-util -w -a 0 -d 2341:0366 -D GIGAR1_MP_FW.dfu

I can see a mounted mass storage drive “GIGA”. So I guess it has some issue with the OpenMV firmware.

@iabdalkader - Seems like a bug.

Hi, please install the firmware again and check the Erase internal file system checkbox:

I have flashed the firmware again with the Erase internal file system checkbox enabled but it did not solve the issue.

How big is the drive that you see with the MicroPython firmware ? The older releases used the internal flash, not the QSPI one. Can you try the latest stable build 1.21.0 from here ?

The size is very small. :roll_eyes:

I flashed with the latest firmware ARDUINO_GIGA-20231005-v1.21.0.dfu but it is also not mounting the drive.

Yes this confirms it, for some reason only the internal flash storage works on your board/OS not the QSPI, both MicroPython 1.21.0 and our firmware use the QSPI storage. I have a Giga H7 with me and it mounts the QSPI storage just fine, so it’s either your board or the OS that’s the issue, I don’t have a Mac to test with but I will ask someone to test it and get back to you.

I have flashed it with the latest OpenMV firmware again and connected it to the Raspberry Pi 4.

dmesg output:


[  148.325483] usb 1-1.1: new full-speed USB device number 3 using xhci_hcd
[  148.719726] usb 1-1.1: New USB device found, idVendor=2341, idProduct=0466, bcdDevice= 2.00
[  148.719760] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  148.719776] usb 1-1.1: Product: Giga Virtual Comm Port in FS Mode
[  148.719791] usb 1-1.1: Manufacturer: Arduino
[  148.719804] usb 1-1.1: SerialNumber: 3956374F3132
[  148.789831] cdc_acm 1-1.1:1.0: ttyACM0: USB ACM device
[  148.789923] usbcore: registered new interface driver cdc_acm
[  148.789929] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[  148.796495] usb-storage 1-1.1:1.2: USB Mass Storage device detected
[  148.797358] scsi host0: usb-storage 1-1.1:1.2
[  148.797765] usbcore: registered new interface driver usb-storage
[  148.803667] usbcore: registered new interface driver uas
[  149.833545] scsi 0:0:0:0: Direct-Access     MicroPy  pyboard Flash    1.00 PQ: 0 ANSI: 2
[  149.835606] sd 0:0:0:0: Attached scsi generic sg0 type 0
[  149.836358] sd 0:0:0:0: [sda] 30976 512-byte logical blocks: (15.9 MB/15.1 MiB)
[  149.836731] sd 0:0:0:0: [sda] Write Protect is off
[  149.836751] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[  149.837132] sd 0:0:0:0: [sda] No Caching mode page found
[  149.842967] sd 0:0:0:0: [sda] Assuming drive cache: write through
[  149.859063]  sda: sda1
[  149.863908] sd 0:0:0:0: [sda] Attached SCSI removable disk

fdisk -l output:

Disk /dev/sda: 15.13 MiB, 15859712 bytes, 30976 sectors
Disk model: pyboard Flash   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start   End Sectors Size Id Type
/dev/sda1         256 30975   30720  15M  1 FAT12

I am accessing the RPI4 headless over ssh so can’t see if it is auto mounted. How do you check or mount it using command line? I tried mount -t vfat /dev/sda1 /mnt but not working.

Yes sudo mount -t vfat /dev/sda1 /path/to/mnt_point/ should work.

BTW it seems to be mounting fine on Ventura, so I guess we can rule out an OS issue. Do you have an early prototype/sample or something ?

I received it directly from Arduino in March. How can I check whether the QSPI flash is faulty or not?

I think March would make it an early dev sample, not sure, about the QSPI, it might not be faulty, although everything points to an issue with it, here’s mine do you have a different one maybe ?

It’s the same. Maybe I need to check the QSPI flash using the Arduino IDE.

Arduino sketch can read the QSPI flash so I think it is not faulty.


19:07:49.183 -> Looking for Partitions on the Flash Memory... MBR Found
19:07:49.183 -> Boot Signature: 0x55AA
19:07:49.183 -> 
19:07:49.183 -> Printing Partitions Table and Info...
19:07:49.183 -> ================================
19:07:49.183 -> Partition: 1
19:07:49.183 -> Bootable: No
19:07:49.183 -> Type: 0x00
19:07:49.183 -> ================================
19:07:49.183 -> Partition: 2
19:07:49.183 -> Bootable: No
19:07:49.183 -> Type: 0x00
19:07:49.183 -> ================================
19:07:49.183 -> Partition: 3
19:07:49.183 -> Bootable: No
19:07:49.183 -> Type: 0x00
19:07:49.183 -> ================================
19:07:49.183 -> Partition: 4
19:07:49.183 -> Bootable: No
19:07:49.183 -> Type: 0x00
19:07:49.183 -> 
19:07:49.183 -> No more partitions are present.
19:07:49.183 -> 
19:07:49.183 -> Total Space [KBytes]:         16384
19:07:49.183 -> Allocated Space [KBytes]:     0
19:07:49.183 -> Unallocated Space [KBytes]:   16384

Can you try QSPIFormat sketch ?

12:22:42.783 -> Available partition schemes:
12:22:42.783 -> 
12:22:42.783 -> Partition scheme 1
12:22:42.783 -> Partition 1: WiFi firmware and certificates 1MB
12:22:42.783 -> Partition 2: OTA and user data 13MB
12:22:42.783 -> 
12:22:42.783 -> Partition scheme 2
12:22:42.783 -> Partition 1: WiFi firmware and certificates 1MB
12:22:42.783 -> Partition 2: OTA 5MB
12:22:42.783 -> Partition 3: User data 8MB
12:22:42.783 -> 
12:22:42.783 -> Do you want to use partition scheme 1? Y/[n]
12:22:42.783 -> If No, partition scheme 2 will be used.
12:22:50.793 -> 
12:22:50.793 -> WARNING! Running the sketch all the content of the QSPI flash will be erased.
12:22:50.793 -> Do you want to proceed? Y/[n]
12:22:55.721 -> 
12:22:55.721 -> QSPI Flash formatted!
12:22:55.721 -> It's now safe to reboot or disconnect your board

Here I answered Yes and Yes.

Then try the USB Storage example → AccessFlashAsUSBDisk, you should see 2 volumes mounted.

After running the two sketches as you suggested, there are two mounted volumes named “NO NAME”.

Yes one of them should be 1MBs the other ~15MBs, so it seems your QSPI is fine, I’m not sure why it’s not working with MicroPython then. Can you please send a picture of the board ?

Also, can you try the attached MicroPython firmware see if it works.
firmware.dfu (1.0 MB)

The attached firmware did not work.

Here is the board picture:

Can you please zoom in on the flash part ?

Also I’m attaching another firmware that uses a slower clock for the QSPI (40MHz) it might not be the issue but worth a shot.
firmware.dfu (1.0 MB)

Note you should upload OpenMV firmware first and erase the flash, this will ensure the partitions are gone and the QSPI is formatted correctly.

This firmware also did not work.

Also, I wanted to confirm one thing. Is the OpenMV’s bootloader different than the default Arduino’s one?

I remember, I soft-bricked the board 2 days ago and re-flashed the bootloader with dfu-util as suggested in this URL.