Commit Graph

792 Commits

Author SHA1 Message Date
Jesse Braham
26473baf0e
Assorted small fixes and improvements (#635)
* Include the `esp-riscv-rt` package in VS Code workspace

* Fix a couple warnings

* Update dependencies

* Top-level README improvements
2023-07-04 10:41:32 -07:00
Kayo Phoenix
74438fcec5
ADC raw values calibration (#555)
* adc_cal: c2: Add efuse functions for reading calibration

* adc_cal: c3: Add efuse functions for reading calibration

* adc_cal: c6: Add efuse functions for reading calibration

* adc_cal: Add extra traits to support calibration

- `AdcCalScheme<ADCI>` implemented for each calibration scheme (basic, linear, curved)
- `AdcCalEfuse` implemented for each ADC unit to get calibration data from efuse bits

* adc_cal: Add basic ADC calibration scheme

Basic calibration is related to setting some initial bias value to ADC unit.
Such values usually is stored in efuse bit fields but also can be measured
in runtime by connecting ADC input to ground internally.

* adc_cal: Add line fitting ADC calibration scheme

This scheme also includes basic calibration and implements gain correction based
on reference point.

Reference point is a pair of reference voltage and corresponding mean raw ADC
value. Such raw values usually is stored in efuse bit fields for each supported
attenuation.

Possibly it also can be measured in runtime by connecting ADC to reference
voltage internally.

* adc_cal: Add curve fitting ADC calibration scheme

This scheme also includes basic and linear and implements final polynomial error
correction.

* adc_cal: riscv: Add ADC calibration implementation for riscv chips

* adc_cal: c2: Add calibrated ADC reading example

This example uses line fitting calibration scheme by default.
It periodically prints both raw measured value and computed millivolts.

* adc_cal: c3: Add calibrated ADC reading example

This example uses curve fitting calibration scheme by default.
It periodically prints both raw measured value and computed millivolts.

* adc_cal: c6: Add calibrated ADC reading example

This example uses curve fitting calibration scheme by default.
It periodically prints both raw measured value and computed millivolts.

* adc_cal: riscv: Add changelog entry for ADC calibration
2023-07-04 10:14:27 -07:00
Björn Quentin
996da27f30
Bare-bones support to run code on ULP-RV/LP core (#631)
* Bare-bones support to run code on ULP-RV/LP core

* Add CHANGELOG.md entry
2023-07-03 16:15:34 +02:00
Hannah Kolbeck
a86c2ac310
Clean up a stray comment in rtc_time examples (#630)
Co-authored-by: Hannah Kolbeck <hskolbeck@gmail.com>
2023-06-30 12:30:05 +01:00
Jesse Braham
6869f8c783 Update embedded-graphics and ssd1306, address breaking changes 2023-06-28 09:47:43 -07:00
Jesse Braham
89ba8f6e30
Update esp-hal-procmacros package dependencies and features (#628)
* Remove unnecessary `riscv` and `xtensa` features from proc macro crate

* Update `darling` and `syn`, address breaking changes

* Update CHANGELOG

* Remove unneeded macro definition/invocation
2023-06-28 08:43:06 -07:00
Dániel Buga
2371c30542
Simplify user-facing DMA channel types (#626)
* Introduce a trait for DMA channels

This trait is then used to hold types related to the particular DMA channel. This change allows us to simplify user-facing types.

* Remove private type from I2s

* Remove redundant spi3 example, update examples

* Merge markdown sections

* Add changelog entry
2023-06-28 13:03:49 +01:00
Jesse Braham
c5f0060d34
Miscellaneous fixes/improvements (#627)
* Un-comment remaining device peripheral definitions for ESP32-H2

* Re-work `RadioExt` implementations, add support for ESP32-H2

* README updates for ESP32-C6/H2

* Update CHANGELOG
2023-06-27 07:14:31 -07:00
Björn Quentin
16f78b1fb2
Merge pull request #624 from bugadani/i2s
I2S cleanup
2023-06-27 08:56:52 +02:00
Björn Quentin
38a82c72e1
Merge pull request #625 from bugadani/channel2
Disallow users creating DMA channel types, fix PDMA descriptor count docs
2023-06-27 08:52:07 +02:00
Björn Quentin
73fb717618
Merge pull request #623 from bugadani/dma
Add WithDmaSpi3 to prelude on espd32s3
2023-06-27 08:46:09 +02:00
Dániel Buga
9e969883d4 Remove redundant trait bounds 2023-06-26 19:31:23 +02:00
Dániel Buga
8ffede1f68 Fix typos 2023-06-26 19:31:21 +02:00
Dániel Buga
5c2e978e07 Add changelog entry 2023-06-26 19:25:15 +02:00
Dániel Buga
7777f0ac6c Update PDMA descriptor docs 2023-06-26 18:55:53 +02:00
Dániel Buga
b83f3e87e1 Prevent constructing some types 2023-06-26 18:54:36 +02:00
Dániel Buga
660c9e056a Add an example to test the prelude 2023-06-26 18:40:31 +02:00
Dániel Buga
c0243a9729 Add WithDmaSpi3 to prelude on espd32s3 2023-06-26 18:24:02 +02:00
Alex Johnson
bce7210b01
Async serial uart read (#620)
* implement embassy async uart read

* Add embassy async read support for uart

* changes based on review

* fix CI failures

* change review #2

* fixed re-opened PR number

* changes review no.3

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2023-06-26 16:56:32 +01:00
Dániel Buga
7f80b23c9d
Correct DMA descriptor docs, math (#622) 2023-06-26 16:39:37 +01:00
Björn Quentin
3c4dc8df6a
Merge pull request #619 from bjoernQ/i2c-pin-setup-improvement
Avoid SDA/SCL low  during pin config
2023-06-26 12:42:21 +02:00
bjoernQ
bd157fe3f0 Avoid SDA/SCL low during pin config 2023-06-26 11:06:01 +02:00
Jordan Halase
a562863cde
Add MD5 functionality from ESP ROM (#618)
* Add ROM MD5 definitions in linker and devices

* Add initial MD5 support

* Implement traits and add comments to MD5 module

* Add MD5 example to ESP32-C3

* Test MD5 context on the quick brown fox

* Implemenr From<Context> for Digest

* Add MD5 to the rest of the examples

* Add docs for MD5

* Remove #[repr(transparent)] from md5::Digest

* Update CHANGELOG.md
2023-06-26 09:01:34 +02:00
Björn Quentin
0d1d64d6e7
Merge pull request #616 from bjoernQ/avoid-overlapping-data-rwtext
Avoid overlapping .data / .rwtext
2023-06-23 14:33:09 +02:00
bjoernQ
c7f4bb9c3d Update CHANGELOG.md 2023-06-23 14:18:41 +02:00
bjoernQ
42230c9b16 Avoid overlapping .data / .rwtext 2023-06-23 14:16:50 +02:00
Scott Mabin
087bfa570b
Fix insertion location of trap section in ram (#605)
* Fix insertion location of trap section in ram

* Apply fixes for db and mcuboot

* Add changelog
2023-06-23 12:00:16 +01:00
Jesse Braham
5af8b6387a
Clean up re-exports and make small improvements to documentation (#607)
* Create issue_handler.yml

* No longer re-export `embedded-hal`, hide exported macros in documentation

* Add simple package-level documentation for each HAL package

* Clean up/simplify re-exports

* Fix the examples that I broke

* Ensure top-level modules/types/functions have doc comments

* Update CHANGELOG

* Re-export the `soc::psram` module where available

---------

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
2023-06-22 06:46:50 -07:00
Sergio Gasquez Arcos
a80f919102 Create issue_handler.yml 2023-06-22 05:37:24 -07:00
Jesse Braham
55169346f2 Fix the octal_psram example for ESP32-S3, check example in CI 2023-06-22 02:27:27 -07:00
Kirill Mikhailov
ce73898b67
Fix: incorrect variable access (#603)
* Fix: incorrect variable access 


Added the change to the Changelog


Fix: typo

* Additional details for the CHANGELOG entry
2023-06-22 02:24:19 -07:00
Björn Quentin
9052a39558
ESP32-S3 Octal SPIRAM Support (#610)
* ESP32-S3 Octal SPIRAM Support

* Adjust some code comments
2023-06-22 01:43:46 -07:00
bjoernQ
32c9900fda Fix ESP32-S3 PSRAM start address calculation 2023-06-22 00:26:52 -07:00
Jordan Halase
144169fd89
Fix rom::crc docs (#611)
* Fix rom::crc docs

* Make ROM mod.rs consistent with esp-idf-hal
2023-06-22 00:06:34 -07:00
Jesse Braham
ca07b7183e
Use both timers in TIMG0 for embassy time driver when able (#609)
* Use both timers in `TIMG0` for embassy time driver when able

* Update CHANGELOG
2023-06-21 06:55:18 -07:00
Jesse Braham
b346d8b8a9
If the embassy feature is enabled, ensure that a time driver implementation is available (#608) 2023-06-21 14:16:07 +01:00
Sergio Gasquez Arcos
310809a5bf
Update documentation (#606)
* docs: 📝 Update documentation

* docs: 🐛 Fix typo
2023-06-21 04:03:15 -07:00
Jesse Braham
c32e9fdab0 Fix some warnings relating to ADC and eFuse 2023-06-20 07:43:31 -07:00
Scott Mabin
bd2f0fee2b Pin log crate to 0.4.18
This is temporary measure, as the problem cannot be solved cleanly right
now.

The issue is that the msrv check uses the stable compiler, which uses a
stable cargo. With a stable cargo, the unstable `build-std` option is
not respected within `.cargo/config.toml`. This means `core` is never
rebuilt with the atomic cfg flags so we get this error when building log
version 0.4.19. The 0.4.19 release uses the atomic cfg flags instead of
a custom build script, so by switching back to 0.4.188888888 we can avoid this
issue... for now at least.
2023-06-20 06:35:01 -07:00
Jesse Braham
463ff7137a
CI updates (#599)
* Add `esp-riscv-rt` package to `clippy-riscv` and `rustfmt` checks

* Update `esp32h2-hal` job to check all examples
2023-06-19 07:16:37 -07:00
Sergio Gasquez Arcos
e3b77418c4
ESP32H2: Improve examples documentation (#598)
* style: 🎨 Improve print format

* docs: 📝 Update advanced_serial documentation

* docs: 📝 Update examples documentation
2023-06-19 07:14:12 -07:00
Jesse Braham
a941e6f8a5
Add a debug feature to enable the PACs' impl-register-debug feature (#596)
* Add a `debug` feature to enable the PACs' `impl-register-debug` feature

* Update CHANGELOG
2023-06-19 06:34:04 -07:00
Juraj Sadel
3b689b2a52
H2: Add I2S support (#597)
* H2: Add initial i2s support and i2s_read and i2s_sound examples

* Add I2S_SCLK and I2S_DEFAULT_CLK_SRC constants for all chips

* Update I2S driver

* fmt

* Add changelog

* Change DIN GPIO17 to GPIO14 in ESP32 i2s_read example
2023-06-19 06:24:09 -07:00
Sergio Gasquez
9c2fd36722 fix: ️ Fix clippy warnings 2023-06-19 03:56:37 -07:00
Sergio Gasquez Arcos
d8c3856c82
Udpate H2 and C6 clocks. Remove i2c_clock for all chips but ESP32 (#592)
* feat:  Udpate H2 and C6 clocks. Remove i2c_clock for all chips but ESP32

* fix: 🐛 Fix cfg for i2c0

* docs: 📝 Update changelog

* build: 📌 Pin pacs rev for c6

* docs: 🎨 Fix changelog format

* feat:  Add missing PLL clocks
2023-06-19 03:31:42 -07:00
Kirill Mikhailov
f315d2bf09
Support FOSC CLK calibration for ECO1+ chip revisions of ESP32C6 (#593)
* First README prototype

* README update

Fixed link, uncommented Matrix link, made some preparations before docs will be posted

* Added a change to CHANGELOG

* typo: return header sign back

* Process Fosc frequencies for ECO1+ ESP32C6 chips

e3148369f3

* Final update for FOSC calibration (ESP32C6)

+ fixed few errors

* Fix format + add update to Changelog


Formatting


Formatting (1)
2023-06-15 05:24:09 -07:00
Kirill Mikhailov
524a9dfe96
Updated README.md for ESP32-H2 (#585)
* First README prototype

* README update

Fixed link, uncommented Matrix link, made some preparations before docs will be posted

* Added a change to CHANGELOG

* typo: return header sign back
2023-06-15 05:15:51 -07:00
Sergio Gasquez Arcos
78369097ad
Initial support for RNG in ESP32-H2 (#591)
* feat:  Initial RNG support

* build: 📌 Update rev for H2

* docs: 📝 Update changelog
2023-06-14 07:31:47 -07:00
Jordan Halase
f22cd7370d
Add CRC functionality from ESP ROM (#587)
* Add ESP ROM CRC and fallbacks to HAL

* Cargo fmt

* Add CRC examples

* Cargo fmt

* Cargo fmt and clippy (all)

* Update CHANGELOG.md
2023-06-14 05:40:51 -07:00
Nathan Marley
c41e156a88
Use built-in LED pin (gpio2) in blinky example (#581)
* Use built-in LED pin (gpio2) in blinky example

Hi, I was just running the blinky example and noticed the comments about an LED
being connected to pin GPIO25. I was thinking it might makes more sense to use
the built-in LED pin instead, and no external hardware would be required.

* Add note on GPIO2 led

* Add GPIO2 LED pin change to changelog
2023-06-14 02:16:38 -07:00