Page 1 of 1

SPI Master Driver initialization via AT-commands

Posted: Thu Sep 01, 2022 11:02 am
by Thing1895
Hello,

I am using ESP32-WROOM-32E and trying to read/write to external flash memory via SPI using AT-commands:

AT+DRVSPICONFIGPIO
AT+DRVSPIINIT
AT+DRVSPIRD
AT+DRVSPIWR

https://docs.espressif.com/projects/esp ... mands.html

I configured the AT firmware (./build.py menuconfig -> Component config -> AT):
AT_fw.PNG
AT_fw.PNG (118.37 KiB) Viewed 2940 times
It seems that GPIO configuration (AT+DRVSPICONFIGPIO) works, it returns OK, but I keep getting ERROR when I try to initialize SPI Master Driver (AT+DRVSPIINIT). I tried with many clock speeds, SPI modes, etc. I always get ERROR.
Docklight.PNG
Docklight.PNG (8.67 KiB) Viewed 2940 times
I have also tried several different AT firmware configurations (default, all AT command sets on...)

Does anyone have idea what could be a problem?

Re: SPI Master Driver initialization via AT-commands

Posted: Wed Sep 07, 2022 11:31 am
by ESP_Yake
In fact, if you want to read/write external flash memory, we do not recommend you use the SPI command directly.
We recommend you to use a demo first to adjust the communication with SPI Flash. You can refer to our demo https://github.com/espressif/esp-idf/tr ... lash_fatfs for this part, or you can use SPI demo https://github.com/espressif/esp-idf/tr ... /hd_eeprom to develop.
After you've done this, you can abstract these steps into a few user-defined AT commands https://docs.espressif.com/projects/esp ... mands.html