Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/esp spi bitbang #14590

Merged

Conversation

eren-terzioglu
Copy link
Contributor

@eren-terzioglu eren-terzioglu commented Nov 1, 2024

Summary

Bitbang device supports are added due to flexibility on device testing and other use cases especially the devices which has one related peripheral (e.g. There is one SPI peripheral for C3 or there is one I2C peripheral for C6). This feature adds another interface for related peripheral in cases of when number of peripherals are not enough.

One of the example use case is: Implementation used through working on SPI Slave on device testing on devices which has one SPI peripheral (e.g. esp32c3, esp32c6). With Bitbang support it became possible to test slave driver without needing other chip who acts as master.

  • esp32[s2|s3]: Add SPI bitbang support
  • esp32[c3|c6|h2]: Add SPI bitbang support

Impact

ESP32, ESP32S2, ESP32S3, ESP32C3, ESP32C6, ESP32H2

Testing

Configurations used with ESPRESSIF_SPI_BITBANG option enabled additionally:

esp32s3-devkit:spi
esp32c3-generic:spi
esp32c6-devkitc:spi

Default MOSI-MISO(GPIO3-GPIO2) pins connected with a wire and this command applied:

nsh> spi exch AD
Sending:	AD 
Received:	AD 
nsh> spi exch AB
Sending:	AB 
Received:	AB 

@github-actions github-actions bot added Area: Documentation Improvements or additions to documentation Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Arch: xtensa Issues related to the Xtensa architecture Board: risc-v Board: xtensa Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. labels Nov 1, 2024
Copy link

github-actions bot commented Nov 1, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

github-actions bot commented Nov 1, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

github-actions bot commented Nov 1, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@eren-terzioglu eren-terzioglu marked this pull request as ready for review November 1, 2024 09:37
Copy link

github-actions bot commented Nov 1, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@xiaoxiang781216
Copy link
Contributor

please fix the conflict, @eren-terzioglu

@eren-terzioglu
Copy link
Contributor Author

please fix the conflict, @eren-terzioglu

Thanks for informing, updated.

Copy link

github-actions bot commented Nov 1, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

github-actions bot commented Nov 4, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@acassis
Copy link
Contributor

acassis commented Nov 4, 2024

@lupyuen do you have some idea about this error:

+ python3 -m pytest -m 'common or sim' ./ -B sim -P -L /github/workspace/sources/nuttx/boards/sim/sim/sim/configs/citest/logs/sim/sim -R sim -C --json=/github/workspace/sources/nuttx/boards/sim/sim/sim/configs/citest/logs/sim/sim/pytest.json
/usr/local/lib/python3.10/dist-packages/_pytest/config/__init__.py:318: PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown.
Plugin: helpconfig, Hook: pytest_cmdline_parse
UsageError: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
__main__.py: error: argument -P: expected one argument
For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning
  config = pluginmanager.hook.pytest_cmdline_parse(
ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
__main__.py: error: argument -P: expected one argument

Copy link

github-actions bot commented Nov 5, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

arch/xtensa/src/common/espressif/Kconfig Outdated Show resolved Hide resolved
arch/xtensa/src/common/espressif/Kconfig Outdated Show resolved Hide resolved
@eren-terzioglu
Copy link
Contributor Author

Thanks @lupyuen, updated

Copy link

github-actions bot commented Nov 6, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@eren-terzioglu
Copy link
Contributor Author

Seems error is unrelated to this PR, we can fix it in other PR.

@lupyuen
Copy link
Member

lupyuen commented Nov 6, 2024

@eren-terzioglu Yep let's wait for the Red Error Boxes below to disappear from nuttx-dashboard.org. Then we can rebase with master.

Meanwhile I cloned your fork to my repo, enabled all the builds, to check if there are other errors: https://github.com/nuttxpr2/nuttx/actions/runs/11701148540

Screenshot 2024-11-06 at 5 55 03 PM

@xiaoxiang781216 xiaoxiang781216 merged commit 3f77e97 into apache:master Nov 6, 2024
25 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Arch: xtensa Issues related to the Xtensa architecture Area: Documentation Improvements or additions to documentation Board: risc-v Board: xtensa Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants