-
Notifications
You must be signed in to change notification settings - Fork 220
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
Closed
elasticdotventures
wants to merge
4
commits into
esp-rs:main
from
elasticdotventures:feature/embassy-README
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
## 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. | ||
``` | ||
cargo run --example embassy_hello_world --features "embassy","embassy-time-systick" | ||
``` | ||
|
||
|
||
- timg0 is a peripheral esp32-c3 / espressif specific, has more features compared to systick, configurable frequency, has input capture, output compare, can trigger other peripherals or DMA, Suitable for more complex timing requirements like waveform generation, event timing, pulse counting, etc. there is also a timg1 | ||
``` | ||
cargo run --example embassy_hello_world --features "embassy","embassy-time-timg0" | ||
``` | ||
|
||
### examples/embassy_hello_world.rs | ||
|
||
examples/embassy_i2c.rs | ||
examples/embassy_i2s_read.rs | ||
examples/embassy_i2s_sound.rs | ||
examples/embassy_rmt_rx.rs | ||
examples/embassy_rmt_tx.rs | ||
examples/embassy_serial.rs | ||
examples/embassy_spi.rs | ||
examples/embassy_wait.rs | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.