Skip to content

Commit

Permalink
Merge branch 'fix/doc_2' into 'feature/esp_as_mcu_host'
Browse files Browse the repository at this point in the history
fixes for documentations

See merge request app-frameworks/esp_hosted!508
  • Loading branch information
mantriyogesh committed Sep 20, 2024
2 parents c1e1e70 + a0290bf commit 0d54404
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 151 deletions.
26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ This branch, `feature/esp_as_mcu_host` is dedicated for any host as MCU support.

## 2 Architecture

##### Hosted Slave
This is an ESP chip that provides Wi-Fi, Bluetooth, and other capabilities.
##### Hosted Co-Processor
This is an ESP chip that provides Wi-Fi, Bluetooth, and other capabilities. It is also referred as `hosted-slave` interchangeably.

##### Host MCU
This can be any generic microcontroller (MCU). It uses the capabilities of the Hosted Slave through Remote Procedure Calls (RPCs). The Host MCU sends these RPC commands to the Hosted Slave using a reliable communication bus, like SPI, SDIO, or UART. The Hosted Slave then handles the RPC and provides the requested functionality to the Host MCU.
This can be any generic microcontroller (MCU). We demonstrate any ESP as host. Using port layer, any host can act as host MCU.

The data (network or Bluetooth) is packaged efficiently at the transport layer to minimize overhead and delays when passing between the Host and Slave.

This modular design allows any MCU to be used as the Host, and any ESP chip with Wi-Fi and/or Bluetooth to be used as the Hosted Slave. The RPC calls can also be extended to provide any function required by the Host, as long as the Slave can support it.
##### Communication
- Host extends the capabilities of the Hosted co-processor through Remote Procedure Calls (RPCs). The Host MCU sends these RPC commands to the Hosted co-processor using a reliable communication bus, like SPI, SDIO, or UART. The Hosted co-processor then handles the RPC and provides the requested functionality to the Host MCU.
- The data (network or Bluetooth) is packaged efficiently at the transport layer to minimize overhead and delays when passing between the Host and co-processor.
- This modular design allows any MCU to be used as the Host, and any ESP chip with Wi-Fi and/or Bluetooth to be used as the Hosted co-processor. The RPC calls can also be extended to provide any function required by the Host, as long as the co-processor can support it.

## 3 Solution Flexibility

Expand Down Expand Up @@ -81,9 +82,8 @@ No worries if you don't have an ESP32-P4. In fact, most users don't. You can cho
- Reason: [ESP component manager](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/tools/idf-component-manager.html) automatically clones esp-hosted component while building.
- However, For non-ESP host development, you can clone the repo using command:
```bash
git clone --recurse-submodules \
--branch feature/esp_as_mcu_host --depth 1 \
https://github.com/espressif/esp-hosted \ esp_hosted_mcu
git clone --recurse-submodules --branch feature/esp_as_mcu_host --depth 1 \
https://github.com/espressif/esp-hosted esp_hosted_mcu
```

### 5.2 Dependencies
Expand Down Expand Up @@ -120,7 +120,7 @@ ESP-Hosted-MCU Solution is dependent on `ESP-IDF`, `esp_wifi_remote` and `protob
- Please note, Only RPC i.e. control packets are serialised. Data Packets are never serialised as they do not need endien conversion.


## 6. Decide the communication bus in between host and slave
## 6 Decide the communication bus in between host and slave

The communication bus is required to be setup correctly between host and slave.
We refer this as `transport medium` or simply `transport`.
Expand Down Expand Up @@ -259,9 +259,3 @@ If you encounter issues with using ESP-Hosted, see the following guide:
- [Registry Component: esp\_wifi\_remote](https://components.espressif.com/components/espressif/esp_wifi_remote)
- [Registry Component: esp\_hosted](https://components.espressif.com/components/espressif/esp_hosted)







26 changes: 13 additions & 13 deletions docs/design_consideration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**Table of Contents**

- [1. Choosing the Correct ESP chip as Slave](#1-choosing-the-correct-esp-chip-as-slave)
- [1.1 Using ESP chip as Hosted Master](#11-using-esp-chip-as-hosted-master)
- [1.1. Using ESP chip as Hosted Master](#11-using-esp-chip-as-hosted-master)
- [2. General Hardware Considerations](#2-general-hardware-considerations)
- [2.1. GPIOs used for interface](#21-gpios-used-for-interface)
- [2.2. Using SPI insted of SDIO](#22-using-spi-insted-of-sdio)
Expand All @@ -12,14 +12,14 @@
- [3. General Debugging Guidelines](#3-general-debugging-guidelines)
- [3.1. Add tapping points to your PCB prototype](#31-add-tapping-points-to-your-pcb-prototype)
- [3.2. Tap out additional GPIO signals as testing points and future expansion](#32-tap-out-additional-gpio-signals-as-testing-points-and-future-expansion)
- [3.3 Verifying Hosted Interface with Raw Throughput](#33-verifying-hosted-interface-with-raw-throughput)
- [3.3. Verifying Hosted Interface with Raw Throughput](#33-verifying-hosted-interface-with-raw-throughput)
- [4. Others](#4-others)
- [5. References](#5-references)

There are several considerations that need to be taken into account
when implementing ESP-Hosted for your system.

## 1. Choosing the Correct ESP chip as Slave
## 1 Choosing the Correct ESP chip as Slave

For prototyping, any ESP32 chip can be used as the slave, provided it
has the required interface (SPI, SDIO). But when creating an actual
Expand All @@ -44,9 +44,9 @@ The project defaults to using an ESP chip as the Hosted Master. This
is to act as a reference platform and make it easier to evaluate and
test Hosted before porting it to your MCU of choice.

## 2. General Hardware Considerations
## 2 General Hardware Considerations

### 2.1. GPIOs used for interface
### 2.1 GPIOs used for interface

Make sure the correct GPIOs pins on the Hosted Slave and Master are
connected together. Verify that the correct GPIOs are set-up in
Expand All @@ -58,7 +58,7 @@ connected together. Verify that the correct GPIOs are set-up in
> under Hosted. Check the ESP datasheet to verify the GPIOs you select
> can be used as a Hosted interface.
### 2.2. Evaluate with jumpers first
### 2.2 Evaluate with jumpers first

It is flexible to evaluate with jumper cables or bread board than full-fledged PCB.
In general, SPI (Standard & Dual SPI) imposes fewer hardware requirements compared to
Expand All @@ -80,7 +80,7 @@ Once you evaluate the solution on jumper cables, you can move to PCB solutions w
- Quad SPI : jumpers not supported, only PCB
- SDIO 4 Bit: Jumpers not supported, only PCB

### 2.3. Whenever possible, Use `IO_MUX` GPIOs.
### 2.3 Whenever possible, Use `IO_MUX` GPIOs.

In general, ESP peripheral interfaces can be assigned to any available
GPIO through a multiplexer. But some ESPs have dedicated GPIOs for
Expand All @@ -93,7 +93,7 @@ interface for Hosted.
> The SDIO interface on the ESP32 and ESP32-C6 have fixed GPIO
> assignments and cannot be changed.
### 2.4. Signal Length and Noise Reduction
### 2.4 Signal Length and Noise Reduction

For best performance, a PCB with traces should be used to connect the
Hosted Slave and Master. For prototyping, jumper cables can be used,
Expand Down Expand Up @@ -123,15 +123,15 @@ For jumper cables, you can try surrounding the signals, especially the
> Also check the Hosted documentation for SPI and SDIO for more
> information and guidelines on the interfaces.
## 3. General Debugging Guidelines
## 3 General Debugging Guidelines

### 3.1. Add tapping points to your prototype
### 3.1 Add tapping points to your prototype

Adding tapping points or headers to the Hosted interface signals on
your prototype will make it easier to check whether the Hosted
interface is working as expected.

### 3.2. Tap out additional GPIO signals as testing points and future expansion
### 3.2 Tap out additional GPIO signals as testing points and future expansion

Add tapping points to some unused GPIOs on both the Hosted Slave and
Host on your prototype PCB. This can later be use for debugging or
Expand Down Expand Up @@ -169,7 +169,7 @@ on Host, enter `Menuconfig` and enable **Component config** --->
the data transfer direction: **Host to Slave**, **Slave to Host** or
**Bidirectional**.

## 4. Others
## 4 Others

Check the References below for links to the Product Selector, and more
detailed information on the interfaces used in Hosted. If you have
Expand All @@ -179,7 +179,7 @@ You can also raise an Issue on the ESP-Hosted Github repository. Check
that the issue has not already been raised before submitting. The
solution to your problem may have already been provided.

## 5. References
## 5 References

**External Links**

Expand Down
2 changes: 1 addition & 1 deletion docs/esp32_p4_function_ev_board.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ESP-Hosted on the ESP32-P4-Function-EV-Board DevKit

<details>
<summary>**Table of Contents**</summary>
<summary>Table of Contents</summary>

- [Introduction](#1-introduction)
- [Set-Up ESP-IDF](#2-set-up-esp-idf)
Expand Down
Loading

0 comments on commit 0d54404

Please sign in to comment.