SPI Master Driver initialization via AT-commands

Thing1895
Posts: 1
Joined: Thu Sep 01, 2022 9:39 am

SPI Master Driver initialization via AT-commands

Postby Thing1895 » Thu Sep 01, 2022 11:02 am

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 2939 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 2939 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?

ESP_Yake
Posts: 109
Joined: Mon Mar 06, 2017 12:23 pm

Re: SPI Master Driver initialization via AT-commands

Postby ESP_Yake » Wed Sep 07, 2022 11:31 am

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

Who is online

Users browsing this forum: No registered users and 50 guests