Open AdamMarciniak opened 2 years ago
Here's the culprit:
SPIFlash::SPIFlash(uint8_t cs, SPIClass *spiinterface) {
_spi = spiinterface; //Sets SPI interface - if no user selection is made, this defaults to SPI
if (_spi == &SPI) {
_SPIInUse = STDSPI;
}
else {
_SPIInUse = ALTSPI;
}
csPin = cs;
pinMode(csPin, OUTPUT);
CHIP_DESELECT
}
When using HSPI, it causes _SPIInUse to be ALTSPI. When I modify the code to use STDSPI, it works!
I'm not sure what the difference is much or how best to modify this but there it is :)
I'm using the ESP32's HSPI ports for communication. When I run the example test code, the device isn't found and the JEDEC ID just shows up as zeros.
I know my wiring is correct and all since I am able to manually send SPI commands to the chip and have it correctly send back the JEDEC ID like so:
Any ideas?