acassis commented on code in PR #18467:
URL: https://github.com/apache/nuttx/pull/18467#discussion_r2867787064


##########
Documentation/platforms/xtensa/esp32s3/spi.rst:
##########
@@ -1,40 +1,144 @@
+.. _esp32s3_spi:
+
 SPI Configuration for ESP32-S3
 ===============================
 
-This guide explains how to configure SPI on ESP32-S3, addressing common issues
-like the one reported in `Issue #12638 
<https://github.com/apache/nuttx/issues/12638>`_.
+This guide explains how to set up SPI on the ESP32-S3. I wrote this after 
figuring out the configuration myself - hopefully it helps others avoid the 
same confusion.
 
 Prerequisites
 -------------
-- NuttX configured for ESP32-S3
-- Basic understanding of the NuttX configuration system
+Before starting, make sure:
+- You can already build NuttX for ESP32-S3
+- You know how to use menuconfig (basic navigation is enough)
 
 Configuration Steps
 -------------------
-1. Enable SPI support in menuconfig::
+Here's what I did to get SPI working:
+
+1. **Enable SPI support**
+   
+   Run `make menuconfig` and go to:
+   
+```Device Drivers -> SPI Support```

Review Comment:
   SPI Support -> SPI Driver Support



##########
Documentation/platforms/xtensa/esp32s3/spi.rst:
##########
@@ -1,40 +1,144 @@
+.. _esp32s3_spi:
+
 SPI Configuration for ESP32-S3
 ===============================
 
-This guide explains how to configure SPI on ESP32-S3, addressing common issues
-like the one reported in `Issue #12638 
<https://github.com/apache/nuttx/issues/12638>`_.
+This guide explains how to set up SPI on the ESP32-S3. I wrote this after 
figuring out the configuration myself - hopefully it helps others avoid the 
same confusion.
 
 Prerequisites
 -------------
-- NuttX configured for ESP32-S3
-- Basic understanding of the NuttX configuration system
+Before starting, make sure:
+- You can already build NuttX for ESP32-S3
+- You know how to use menuconfig (basic navigation is enough)
 
 Configuration Steps
 -------------------
-1. Enable SPI support in menuconfig::
+Here's what I did to get SPI working:
+
+1. **Enable SPI support**
+   
+   Run `make menuconfig` and go to:
+   
+```Device Drivers -> SPI Support```
+
+
+Enable `[*] SPI`
+
+2. **Select the SPI peripheral**
+
+Go to:
+```System Type -> ESP32-S3 Peripheral Selection```
+
+Enable `[*] SPI2`
+
+3. **Enable SPI Exchange**
+
+Back in:
+```Device Drivers -> SPI Support```
+
+Enable `[*] SPI Exchange`
+
+4. **Enable Chip Select (optional)**
+
+In the same menu, enable:
+[*] SPI Chip Select

Review Comment:
   It is not in the same menu, the Chip Select is configured at System Type -> 
SPI configuration



##########
Documentation/platforms/xtensa/esp32s3/spi.rst:
##########
@@ -1,40 +1,144 @@
+.. _esp32s3_spi:
+
 SPI Configuration for ESP32-S3
 ===============================
 
-This guide explains how to configure SPI on ESP32-S3, addressing common issues
-like the one reported in `Issue #12638 
<https://github.com/apache/nuttx/issues/12638>`_.
+This guide explains how to set up SPI on the ESP32-S3. I wrote this after 
figuring out the configuration myself - hopefully it helps others avoid the 
same confusion.
 
 Prerequisites
 -------------
-- NuttX configured for ESP32-S3
-- Basic understanding of the NuttX configuration system
+Before starting, make sure:
+- You can already build NuttX for ESP32-S3
+- You know how to use menuconfig (basic navigation is enough)
 
 Configuration Steps
 -------------------
-1. Enable SPI support in menuconfig::
+Here's what I did to get SPI working:
+
+1. **Enable SPI support**
+   
+   Run `make menuconfig` and go to:
+   
+```Device Drivers -> SPI Support```
+
+
+Enable `[*] SPI`
+
+2. **Select the SPI peripheral**
+
+Go to:
+```System Type -> ESP32-S3 Peripheral Selection```
+
+Enable `[*] SPI2`
+
+3. **Enable SPI Exchange**
+
+Back in:
+```Device Drivers -> SPI Support```
+
+Enable `[*] SPI Exchange`
+
+4. **Enable Chip Select (optional)**
+

Review Comment:
   SPI Exchange is enable by default, so I think you can ignore this part



##########
Documentation/platforms/xtensa/esp32s3/spi.rst:
##########
@@ -1,40 +1,144 @@
+.. _esp32s3_spi:
+
 SPI Configuration for ESP32-S3
 ===============================
 
-This guide explains how to configure SPI on ESP32-S3, addressing common issues
-like the one reported in `Issue #12638 
<https://github.com/apache/nuttx/issues/12638>`_.
+This guide explains how to set up SPI on the ESP32-S3. I wrote this after 
figuring out the configuration myself - hopefully it helps others avoid the 
same confusion.
 
 Prerequisites
 -------------
-- NuttX configured for ESP32-S3
-- Basic understanding of the NuttX configuration system
+Before starting, make sure:
+- You can already build NuttX for ESP32-S3
+- You know how to use menuconfig (basic navigation is enough)
 
 Configuration Steps
 -------------------
-1. Enable SPI support in menuconfig::
+Here's what I did to get SPI working:
+
+1. **Enable SPI support**
+   
+   Run `make menuconfig` and go to:
+   
+```Device Drivers -> SPI Support```
+
+
+Enable `[*] SPI`
+
+2. **Select the SPI peripheral**
+
+Go to:
+```System Type -> ESP32-S3 Peripheral Selection```
+
+Enable `[*] SPI2`
+
+3. **Enable SPI Exchange**
+
+Back in:
+```Device Drivers -> SPI Support```
+
+Enable `[*] SPI Exchange`
+
+4. **Enable Chip Select (optional)**
+
+In the same menu, enable:
+[*] SPI Chip Select
+
+You can change the CS pin from GPIO10 if needed.
+
+Pin Mapping
+-----------
+Default pins for SPI2:
+
+- SCK (Clock) → GPIO12
+- MOSI → GPIO11
+- MISO → GPIO13
+- CS (Chip Select) → GPIO10
+
+If these pins conflict with your board, you can change them using the GPIO 
matrix.

Review Comment:
   You didn't explain where it can be changed.
   Please explain that these pins can be configured at System Type -> SPI 
configuration



##########
Documentation/platforms/xtensa/esp32s3/spi.rst:
##########
@@ -1,40 +1,144 @@
+.. _esp32s3_spi:
+
 SPI Configuration for ESP32-S3
 ===============================
 
-This guide explains how to configure SPI on ESP32-S3, addressing common issues
-like the one reported in `Issue #12638 
<https://github.com/apache/nuttx/issues/12638>`_.
+This guide explains how to set up SPI on the ESP32-S3. I wrote this after 
figuring out the configuration myself - hopefully it helps others avoid the 
same confusion.
 
 Prerequisites
 -------------
-- NuttX configured for ESP32-S3
-- Basic understanding of the NuttX configuration system
+Before starting, make sure:
+- You can already build NuttX for ESP32-S3
+- You know how to use menuconfig (basic navigation is enough)
 
 Configuration Steps
 -------------------
-1. Enable SPI support in menuconfig::
+Here's what I did to get SPI working:
+
+1. **Enable SPI support**
+   
+   Run `make menuconfig` and go to:
+   
+```Device Drivers -> SPI Support```
+
+
+Enable `[*] SPI`
+
+2. **Select the SPI peripheral**
+
+Go to:
+```System Type -> ESP32-S3 Peripheral Selection```
+
+Enable `[*] SPI2`
+
+3. **Enable SPI Exchange**
+
+Back in:
+```Device Drivers -> SPI Support```
+
+Enable `[*] SPI Exchange`
+
+4. **Enable Chip Select (optional)**
+
+In the same menu, enable:
+[*] SPI Chip Select
+
+You can change the CS pin from GPIO10 if needed.

Review Comment:
   Please explain the three different Chip Select options:
   
   - By default the Chip Select "(10) SPI2 CS Pin (NEW)" use the internal SPI 
Controller IP to enable/disable the CS pin.
    
   - When "[*] SPI software CS" is enabled, but "[ ] User defined CS (NEW)" is 
will enable by software the GPIO SPI CS Pin, enabling (writing logic level 0 to 
the pin) or disabling (writing logic level 1 to the pin)
    
   - When "[*] SPI software CS" is enabled and "[*] User defined CS (NEW)" is 
enabled, the esp32s3_spiX_select() function will be called from board source 
code to enable/disable the GPIO that the user want to use as CS (see 
boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/esp32s3_board_spi.c for 
reference). This is the mode most similar to how SPI is supported on other MCUs 
supported by NuttX.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to