Commit Graph

615 Commits

Author SHA1 Message Date
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
Sergio Gasquez Arcos
38ebf13bc9
Initial support for smartled in ESP32-H2 (#589)
* feat:  Add hello_rgb example

* feat:  Initial support for RMT

* fix: 🐛 Adjust frequency for H2

* docs: 📝 Update changelog

* build: 📌 Update H2 pacs
2023-06-14 01:52:23 -07:00
Björn Quentin
907fc1fc0f
Merge pull request #586 from teotwaki/fix-forgotten-feature
[Minor][ESP32] Update xtal feature check in build.rs
2023-06-14 09:39:38 +02:00
Sebastian Lauwers
8ec8855e26 Update xtal feature check in build.rs 2023-06-13 15:09:48 +02:00
Jesse Braham
fbe4ed1336
Add initial implementation of radio clocks for ESP32-H2 (#577)
* Add initial implementation of radio clocks for ESP32-H2

* Update CHANGELOG
2023-06-09 12:11:36 +00:00
Scott Mabin
8361ca308c
Move esp-riscv-rt into esp-hal (#578)
* Move esp-riscv-rt into esp-hal

* Add changelog entry
2023-06-07 08:15:47 -07:00
Juraj Sadel
aef0ff4e45
H2: Add timer_interrupt example (#576)
* H2: Use PLL_48M_CLK in Timg driver and add 	imer_interrupt example

* Clean timer driver, add helper configure_src_clk and configure_wdt_src_clk methods

* H2: Add 	imer_interrupt example

* add helper methods for selecting default clk src

* Change PR number in the Changelog
2023-06-06 07:18:20 -07:00
Kayo Phoenix
c6bdf8b8c0
Unified efuse field access (#567)
* Add efuse field tables from IDF

* Add efuse fields constants generator

* Fix MAC field in efuse tables

* Add common efuse field impl

* Add efuse fields support for chips

* Add efuse changes to changelog
2023-06-05 06:15:00 -07:00
Scott Mabin
34740c7f1c
Async GPIO multibank fix (#572)
* Async GPIO multibank fix

- Removes dead code from the default impl of the BankAccess trait
- Adds one new function to the async module to control the interrupt
  enable for any pin

* Add changelog entry
2023-06-01 07:35:52 -07:00
bjoernQ
3dabd57a1d Fix ESP32-H2 direct-boot 2023-05-31 08:39:39 -07:00
Jesse Braham
e096bca561
Add embassy_serial and embassy_wait examples for ESP32-H2 (#569)
* Add `embassy_{serial,wait}` examples for ESP32-H2

* Update the CHANGELOG
2023-05-31 07:17:39 -07:00
Jesse Braham
67e9c60a23
Simplify the Delay driver, derive Clone and Copy (#568)
* Simplify the `Delay` driver, derive `Clone` and `Copy`

The RISC-V and Xtensa implementations of the delay functionality are both safe to access from multiple contexts, and the `Delay` struct does not take ownership of any peripheral struct, so `Delay` is safe to clone/copy

* Update the CHANGELOG
2023-05-31 06:45:53 -07:00
Juraj Sadel
b1630db5d2
H2: Add initial ADC support with example (#565)
* H2: Add initial ADC support with example

* Add changelog
2023-05-31 06:03:27 -07:00
Jesse Braham
d86300f799
Add all SPI examples for the ESP32-H2 (#549)
* Update the `GDMA` driver to support the ESP32-H2

* Update the `SPI` driver to support the ESP32-H2

* Add `SPI` examples for ESP32-H2

* Update CHANGELOG

* Remove copy-pasted references to ESP32-C6

* Update GPIO pins used in SPI examples, add `qspi_flash` example

* Update SPI clock configuration to produce correct clock rate

* Correct comment regarding clock source frequency

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>

* H2: Add PLL_48M_CLK src to ClockControl and RawClocks

* H2: Use PLL_48M_CLK as SPI clk src

* H2: cleanup commented block in SPI driver

* H2: update docs comment in embassy_spi example

* fmt

* Add a new line in embassy_spi example

---------

Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
2023-05-31 09:49:13 +02:00
Sergio Gasquez Arcos
faf60b6d95
Initial support for ASSIST_DEBUG in ESP32-H2 (#566)
* feat:  Add debug_assist example

* feat:  Enable peripherals

* docs: 📝 Add RAM comments

* feat: ️ Update debug_assist example

* docs: 📝 Update changelog

* build: 📌 Update esp-pacs rev for h2

* style: 🎨 Move assist_debug_region* and assist_debug_sp* to peripherals defined by developers
2023-05-30 09:10:55 -07:00
Juraj Sadel
a82c9dbc45 H2: Add initial LEDC support with example 2023-05-29 07:11:44 -07:00
sethp
171e66e87a
feat(riscv): relocate .trap machinery to RAM (#541)
* feat: relocate riscv isr to iram

Previously, the trap vector itself and its immediate callees
(`_start_trap` and `_start_trap_rust_hal`) were located in the mapped
instruction flash range `0x420..`, increasing cache pressure and adding
variable latency to the very beginning of the interrupt/exception
service flow.

This change places those routines in iram directly:

```
   Num:    Value  Size Type    Bind   Vis      Ndx Name
 48177: 40380280  2428 FUNC    GLOBAL DEFAULT    6 _start_trap_rust_hal
 48197: 40380bfc    54 FUNC    GLOBAL DEFAULT    6 _start_trap_rust
 48265: 40380200     0 FUNC    GLOBAL DEFAULT    6 _vector_table
 48349: 40380100     0 NOTYPE  GLOBAL DEFAULT    6 default_start_trap
 48350: 40380100     0 NOTYPE  GLOBAL DEFAULT    6 _start_trap
```

As seen via `readelf -W -s -C ./target/riscv32imc-unknown-none-elf/debug/examples/gpio_interrupt | grep -E _start_trap\|_vector\|Ndx`

* feat(riscv): place .trap in RAM

This change follows through on relocating the `_vector_table`,
`_start_trap`, and `_start_trap_rust` functions for all present
build/link modes for the 'c2, 'c3, 'c6, and 'h2.

It has been tested by running the `software_interrupts` example for the
'c3 in direct-boot and esp-bootloader contexts, but I wasn't able to
identify how to run the `mcu-boot` mode for the 'c3, nor do I have
present access to any of the other devices for testing.

* docs: Update CHANGELOG.md
2023-05-26 20:48:49 +01:00
Dániel Buga
df76905408 Fix C3 ADC2 channel assignment 2023-05-26 10:38:57 -07:00
Jesse Braham
748512f849
Add interrupt-related examples for the ESP32-H2 (#557)
* Add interrupt-related examples for the ESP32-H2

* Update CI workflow to actually check `interrupt_preemption` examples
2023-05-25 09:22:26 -07:00
Jesse Braham
a92c46f309 Correct a number of comments in various examples 2023-05-25 06:02:15 -07:00
Björn Quentin
278ce406b6
Merge pull request #559 from BryanKadzban/add-dma-poll
Add a fn to poll a DMA transfer
2023-05-25 09:57:55 +02:00
Bryan Kadzban
a6835d9cec Add examples for polling DMA transfers.
Only in the SPI case, but the I2S case has the same API so this should
be fine.
2023-05-25 06:37:09 +00:00
Bryan Kadzban
8baf4df20b Add an is_done() poll method to DMA transfers
Implement it by forwarding to the DMA channel's existing is_done mehod.
Add the implementation to both SPI and I2S DMA transfer structs.
2023-05-25 04:48:21 +00:00
Sergio Gasquez Arcos
14ac8c3c80
Initial support for RMT in ESP32-H2 (#556)
* feat:  Enable RMT peripheral

* feat:  Rename RMT GPIOs

* feat:  Add clock source, ram size and ram start

* feat:  Rename GPIOs

* feat:  Add pulse_control example

* fix: 🐛 Fix example clock

* feat:  Initial support for H2

* fix: 📝 Fix typo

* ci:  Enable check on H2

* build: 📌 Update esp-pac revision, use fork

* docs: 📝 Update example documentation

* docs: 📝 Add todo

* docs: 📝 Update changelog

* feat:  Add ram example

* build: 📌 Update H2 PAC

* docs: 📝 Remove todo
2023-05-23 10:14:17 -07:00
Björn Quentin
7b3e19c4c6
Fix half-duplex SPI read (#552)
* Fix half-duplex SPI read

* Update CHANGELOG.md
2023-05-22 14:02:33 +02:00
Dániel Buga
02c7e38cf5
Remove a bunch of generic params from GpioPin (#553) 2023-05-22 12:27:36 +01:00
Dániel Buga
caec716c35
Set ADC attenuation for the correct ADC instance (#554)
* Set ADC attenuation for the correct ADC instance

* Add to changelog
2023-05-22 12:41:07 +02:00
Sergio Gasquez Arcos
2c2bb25262
Initial support for PCNT in ESP32-H2 (#551)
* feat:  Enable PCNT peripheral

* feat:  Rename PCNT GPIOs

* feat:  Add pcnt_encoder example

* build: ⬆️ Update esp-pacs revision

* docs: 📝 Update changelog
2023-05-19 09:27:11 +02:00