I have run the spi_slave example in the ESP-IDF V3.3.2 and it works as I would expect. Now I am attempting to modify it in order to achieve the following:
1) The host MCU will at a 1hz rate send state information to the ESP32 over SPI which will then be relayed via BT to a smartphone app.
2) The ESP32 will process BT packets, at a random time determined by the app user, and should immediately upon receipt transfer the data over SPI to the host MCU.
I am using the handshake line in order to let the host MCU know that there is data waiting. I currently have the spi_slave_transmit command inside a task that is called every 15mS.
The issue that I am having trouble solving is getting the data that is received from the BT link to be immediately transferred to the host MCU. Currently the BT data is always lagging by one read which I assume is do to the call to spi_slave_transmit.
I have attempted to instead of using spi_slave_transmit, use spi_slave_queue_trans and spi_slave_get_trans_result but I am not able to achieve what I mention above.
First off, is what I am attempting to do possible with the ESP32? Secondly, what is the best approach to accomplishing it?
Thanks in advance!
ESP32 as SPI slave
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: No registered users and 256 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.