Copilot commented on code in PR #19127: URL: https://github.com/apache/nuttx/pull/19127#discussion_r3407468431
########## Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitc/index.rst: ########## @@ -687,6 +699,25 @@ If SPI peripherals are already in use you can also use bitbang driver which is a software implemented SPI peripheral by enabling `CONFIG_ESPRESSIF_SPI_BITBANG` option. +spislv +------ + +This configuration enables the SPI2 peripheral in **slave mode** and +provides the ``spislv`` example application to test data exchange with an +external SPI master. + +After building and flashing the firmware, run the following command on the +board terminal:: + + nsh> spislv -x 5 1a2b3c4d5e + +This command enqueues the data sequence ``1a2b3c4d5e`` in the slave buffer. +On the next transfer, the external SPI master should receive this data back +from the slave. + +By default, SPI2 is used with chip select on GPIO16. The pin mapping can be +adjusted through ``menuconfig`` under *System type → SPI configuration*. Review Comment: The documented default SPI2 chip-select GPIO for the `spislv` defconfig does not match the actual configuration. `boards/risc-v/esp32c6/esp32c6-devkitc/configs/spislv/defconfig` sets `CONFIG_ESPRESSIF_SPI2_CSPIN=15`, so the doc should not state GPIO16 as the default CS pin. ########## Documentation/platforms/risc-v/esp32c6/boards/esp32c6-devkitm/index.rst: ########## @@ -475,6 +487,25 @@ If SPI peripherals are already in use you can also use bitbang driver which is a software implemented SPI peripheral by enabling `CONFIG_ESPRESSIF_SPI_BITBANG` option. +spislv +------ + +This configuration enables the SPI2 peripheral in **slave mode** and +provides the ``spislv`` example application to test data exchange with an +external SPI master. + +After building and flashing the firmware, run the following command on the +board terminal:: + + nsh> spislv -x 5 1a2b3c4d5e + +This command enqueues the data sequence ``1a2b3c4d5e`` in the slave buffer. +On the next transfer, the external SPI master should receive this data back +from the slave. + +By default, SPI2 is used with chip select on GPIO1. The pin mapping can be +adjusted through ``menuconfig`` under *System type → SPI configuration*. Review Comment: The documented default SPI2 chip-select GPIO for the `spislv` defconfig does not match the actual configuration. `boards/risc-v/esp32c6/esp32c6-devkitm/configs/spislv/defconfig` sets `CONFIG_ESPRESSIF_SPI2_CSPIN=15`, so users wiring an external SPI master based on this doc will likely use the wrong CS pin. -- 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]
