From c6c03d39f8a048ecdcc5d87893e0b98401c95b3c Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Tue, 31 Oct 2023 10:04:08 +0100 Subject: [PATCH] docs(ulp_riscv): Updated ulp_riscv example README files to update GPIO configuration This commit updates the README files for the ULP RISC-V I2C and Touch sensor examples to mention the GPIO configuration needed to run the examples. --- examples/system/ulp/ulp_riscv/i2c/README.md | 17 ++++++++++++- examples/system/ulp/ulp_riscv/touch/README.md | 24 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/examples/system/ulp/ulp_riscv/i2c/README.md b/examples/system/ulp/ulp_riscv/i2c/README.md index 11ba448c06..a1496bd3ec 100644 --- a/examples/system/ulp/ulp_riscv/i2c/README.md +++ b/examples/system/ulp/ulp_riscv/i2c/README.md @@ -7,13 +7,28 @@ This example demonstrates how to use the RTC I2C peripheral from the ULP RISC-V The ULP program is based on the BMP180 Temperature and Pressure sensor (https://cz.mouser.com/datasheet/2/783/BST-BMP180-DS000-1509579.pdf) which has an I2C interface. The main CPU initializes the RTC I2C peripheral, the BMP180 sensor and loads the ULP program. It then goes into deep sleep. -The ULP program periodically measures the temperature and pressure values from the BMP180 sensor and wakesup the main CPU when the values are above a certain thershold. +The ULP program periodically measures the temperature and pressure values from the BMP180 sensor and wakes up the main CPU when the values are above a certain threshold. + +## How to use example + ### Hardware Required * A development board with a SOC which has a RISC-V ULP coprocessor (e.g., ESP32-S2 Saola) * A BMP180 sensor module * A USB cable for power supply and programming +#### Pin Assignment: + +**Note:** The following pin assignments are used by default. + +| | SDA | SCL | +| --------------------------- | ------| ------| +| ESP32-S2/S3 RTC I2C Master | GPIO3 | GPIO2 | +| BMP180 Sensor | SDA | SCL | + +**Note:** The SDA line can only be configured to use either GPIO1 or GPIO3 and the SCL line can only be configured to use either GPIO0 or GPIO2. +**Note:** This example enables the internal pull-up resistors for the SDA/SCL lines by default. + ## Example output Below is the output from this example. diff --git a/examples/system/ulp/ulp_riscv/touch/README.md b/examples/system/ulp/ulp_riscv/touch/README.md index d8d9afb923..7c3694b906 100644 --- a/examples/system/ulp/ulp_riscv/touch/README.md +++ b/examples/system/ulp/ulp_riscv/touch/README.md @@ -17,6 +17,30 @@ The ULP Program scans all touch pad sensors periodically. When the ULP program f * A development board with ESP32-S2 or ESP32-S3 +The following capacitive touch pads are supported on ESP32-S2/S3: + +``` + ---------------------------------------------------------- + | Touch Pad | GPIO Pin | + |------------|-------------------------------------------| + | T0 | Internal channel, not connected to a GPIO | + | T1 | GPIO1 | + | T2 | GPIO2 | + | T3 | GPIO3 | + | T4 | GPIO4 | + | T5 | GPIO5 | + | T6 | GPIO6 | + | T7 | GPIO7 | + | T8 | GPIO8 | + | T9 | GPIO9 | + | T10 | GPIO10 | + | T11 | GPIO11 | + | T12 | GPIO12 | + | T13 | GPIO13 | + | T14 | GPIO14 | + ---------------------------------------------------------- +``` + ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: