You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On line 64 of "Adafruit_SPIFlashBase.cpp", there is check for the RP2040 platform. If true, the onboard flash is automatically configured and the flash detection sequence is skipped. If an external SPI flash is being used, this assumption prevents it from being correctly recognized.
Disabling this check allows the library to work with external flash chips.
JEDEC ID, size, numPages and sectorCount are affected by this. Writing, reading and erasing works in my case.
Note this probably also happens on ESP32, however I could not test it.
How to reproduce ?
Connect an external SPI flash module to the Pi Pico (W25QQ32BV)
Define CUSTOM_CS and CUSTOM_SPI in flash_config.h
Initialize the library
Try to read the JEDEC ID
The output should be wrong, unless the platform check on line 64 of "Adafruit_SPIFlashBase.cpp" is disabled.
Debug Log as attached txt file
No response
Screenshots
Wrong output:
Correct output:
The text was updated successfully, but these errors were encountered:
I ran into the same issue. as a work around I commented out the Pico internal memory and let the lib code fall through to the non-pico variant. Attached my "patched" version that appears to work, but I admit I haven't tested everything :)
in AdafruitSPIFlashBase.cpp add at line 64 #if 0
On line 91 add #endif
Operating System
Others
IDE version
PlatformIO 3.3.3, VSCode 1.96.2
Board
Raspberry Pi Pico W
BSP version
Arduino-pico 4.4.1
SPIFlash Library version
5.0.1
Sketch as attached file if not stock example
sketch.zip
What happened ?
On line 64 of "Adafruit_SPIFlashBase.cpp", there is check for the RP2040 platform. If true, the onboard flash is automatically configured and the flash detection sequence is skipped. If an external SPI flash is being used, this assumption prevents it from being correctly recognized.
Disabling this check allows the library to work with external flash chips.
JEDEC ID, size, numPages and sectorCount are affected by this. Writing, reading and erasing works in my case.
Note this probably also happens on ESP32, however I could not test it.
How to reproduce ?
The output should be wrong, unless the platform check on line 64 of "Adafruit_SPIFlashBase.cpp" is disabled.
Debug Log as attached txt file
No response
Screenshots
Wrong output:
Correct output:
The text was updated successfully, but these errors were encountered: