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

notes for esp32c3 & embassy #834

Conversation

elasticdotventures
Copy link

@elasticdotventures elasticdotventures commented Sep 30, 2023

Documentation

I'm trying to put together some signposting to link embassy-rs and ultimately drogue-device

Must

  • [ x ] The code compiles without errors or warnings.
  • [ x ] All examples work.
  • [ x ] cargo fmt was run.
  • [ x ] Your changes were added to the CHANGELOG.md in the proper section.
  • [ x ] You updated existing examples or added examples (if applicable).
  • [ x ] Added examples are checked in CI

Nice to have

  • You add a description of your work to this PR.
  • You added proper docs for your newly added features and code.

## Embassy Examples

* 😁 Decision Point1: choose systick vs timg0
- systick is for ARM cortex-m, the esp-hal provides a simple 24-bit clear on write decrementing wrap-on-zero counter for os-scheduling sed for basic countdown timer, interrpt generation on reaching zero. Better for ARM, etc. compatibility.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you get this from?

I'd suggest familiarizing yourself with the ESP32 lineup and their peripherals. I don't think any ARM-based ESP32 exists, the C3 certainly isn't ARM. The SysTimer peripheral, that this feature coopts as the timebase is a 52 bit timer peripheral present in most ESP32s (it's there at least in the S2, S3, C3, and maybe more).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bugadani - see cunninghams law.

I'm attempting to sift through the code and understand it, write up documentation with my guesses and hopefully get them corrected either in github or matrix.

I assumed (incorrectly) the systick was put in to provide compatibility for embassy-rs which seems stm32 centric, that's just what I was able to find/infer from searching & asking chatgpt. the documentation in this area is sparse.

I was trying to say that systick might be a better choice than timg0 if multiple architectures are important - because apparently I must choose one, and only one timer with no explanation why one is better or different than the other.

@MabezDev
Copy link
Member

Thanks for bringing this to our attention, and thanks for the PR!

I've gone ahead and opened #835 instead as this PR only addresses the esp32c3, and duplicates some information we already have in the documentation.

@MabezDev MabezDev closed this Sep 30, 2023
@elasticdotventures elasticdotventures deleted the feature/embassy-README branch October 1, 2023 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants