The usb-storage example may not persist the data that is written to the device. The reason for this is most likely that the writeBlock in the scsi_readwrite.go is performing WriteAt without erasing the page first.
The RP2 implementation of the WriteAt here clearly says that it "assumes that the destination is already erased". The low-level impl on RP2350 doesn't return an error in case of unsuccessful write (the flash_range_write is a void function, so we simply don't have the capability). All this causes the MSC driver to get a nil error even if the write actuall faild.
The
usb-storageexample may not persist the data that is written to the device. The reason for this is most likely that thewriteBlockin the scsi_readwrite.go is performingWriteAtwithout erasing the page first.The RP2 implementation of the
WriteAthere clearly says that it "assumes that the destination is already erased". The low-level impl on RP2350 doesn't return an error in case of unsuccessful write (theflash_range_writeis a void function, so we simply don't have the capability). All this causes the MSC driver to get anilerror even if the write actuall faild.