Conversation
Changing from multi-block writes to single block worked for macos and ubuntu. I was able to mount read and write both flash and microSD using a Metro RP2040.
|
@hathach please let me know if this works for you or you would like to see further testing. |
hathach
left a comment
There was a problem hiding this comment.
Thaak you for your PR. Yeah, I am actually able to reproduce the issue with macos. That seems that reading multiple blocks taking too long and macos isn't happy with that. I also notice that there is a new SdFat v2.3 https://github.com/greiman/SdFat/releases/tag/2.3.0 upstream that specifically add the SDIO support for rp2, let me try to update to see if that would help first. Otherwise, I think we can merge this
|
Update: I have bumped up SdFat to 2.3.0 for SDIO support, but the issue still exists, I am troubleshooting further. PS: it got write10 failed on macos, but working just fine with Linux (debia12). |
|
More Update: I found the root cause, making the PR for that real soon. I need to bump up sdfat v2.3.0 for sdio support first, since it is much quicker using 4 data line than standard spi. However SdFat v2.3.0 include some changes that we need to update other core (nrf52) first. |
|
Awesome! I'll do a few benchmarks of the current speed which does feel pokey. Then I can comepare those with the upcoming SDIO PR. |
|
this is my benchmark adafruit/SdFat#32 in short 3x read speed. Here is the "correct" fix for macos issue #533 . In short the example attempt to dump the sdcard drive to serial cause the conflict with host. I think it either
the "fix" completely remove the sdcard contents dump. a better fix would be marking the SDcard as not ready (return false in TEST_UNIT_READY) while performming self-reading, but that would maybe take a bit of time. I will do it later if needed. |
Changing from multi-block to single block worked for macOS and Ubuntu. This is a minimal change of only a few lines. Without it I was only able to access the drives through Ubuntu as they would quickly unmount on macOS.
Works with both on board flash and microSD using a Metro RP2040 running this updated version of msc_external_flash_sdcard.ino.
Troubleshooting details #455