25 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Jesse Braham
661a9de5eb
Add some miscellaneous examples for the ESP32-H2 (#548)
* Add some miscellaneous examples for the ESP32-H2

* Update the CHANGELOG
2023-05-17 07:13:47 -07:00
Sergio Gasquez Arcos
a7e4400fb5
Initial support for MCPWM in ESP32-H2 (#544)
* feat:  Enable mcpwm peripheral

* feat:  Initial support MCPWM

* fix: 🐛 Select the rigth clock

* fix: 🐛 Select the XTAL clock

* docs: 📝 Update changelog
2023-05-16 09:00:11 -07:00
Sergio Gasquez Arcos
e2442f2d47
Initial support for I2C in ESP32-H2 (#538)
* feat:  Enable i2c peripheral

* feat:  Add I2cExt1 for H2

* feat:  Initial i2c support

* feat:  Add i2c examples

* ci:  Add embassy_i2c check

* ci: 🐛 Fix features

* docs: 📝 Update changelog

* feat:  Add read_efuse example
2023-05-15 16:20:01 +02:00
Sergio Gasquez Arcos
70e453902c
Initial support for RSA in ESP32-H2 (#526)
* feat:  Initial support for RSA

* docs: 📝 Update docstring

* docs: 📝 Update changelog

* fix: 🔥 Remove duplicated code
2023-05-15 09:42:19 +01:00
Sergio Gasquez Arcos
fa3627c1fd
Add blinky_erased_pins example for ESP32-H2 (#530)
* feat:  Add blinky_erased_pins example

* docs: 📝 Update docstrings

* docs: 📝 Update changelog
2023-05-12 14:18:04 +02:00
Sergio Gasquez Arcos
5b47c37449
Initial support for AES in ESP32-H2 (#528)
* feat:  Initial support for AES

* docs: 📝 Update changelog
2023-05-12 13:46:22 +02:00
Sergio Gasquez
29757abe07 feat: Initial support for SHA 2023-05-11 09:30:40 -07:00
Jesse Braham
5de726f034 Rebase branch, update rtc_cntl implementation, add rtc_time example 2023-05-08 08:10:34 -07:00
Jesse Braham
ca54d29fcb Update the top-level README and CHANGELOG, fix blinky example 2023-05-08 08:03:08 -07:00
Jesse Braham
fc2dd38d83 Fix build errors after rebasing 2023-05-08 08:03:08 -07:00
Kirill Mikhailov
7d72acb2d7 Added WDT support for ESP32-H2 (#511)
* Added init function

* Populated enums

* Adding enums

* Add TODO (according to IDF update)

* Added WDT support for ESP32-H2

* Updated hello_world example

* Add two examples for both watchdog and RTC watchdog

* Add specific bit initialization for TIMG0 and TIMG1

* Cleaning the code

* adjusting for rustfmt

* uncommented direct-boot feature test in CI
2023-05-08 08:03:08 -07:00
Jesse Braham
4e9e1d1fea Add ESP32-H2 support for TIMG and UART (#500)
* Begin working on `PeripheralClockControl` for the ESP32-H2

* Update `UART` driver to add H2 support

* Update `TIMG` driver to add H2 support

* Update the hello_world example to use `TIMG` and `UART`
2023-05-08 08:03:08 -07:00
Jesse Braham
c3b4e83846 Add initial ADC/GPIO implementation for ESP32-H2 (#494)
* Add `esp32h2-hal` package to the VS Code workspace and CI workflow

* Add initial (not quite complete) implementation of GPIO/ADC for ESP32-H2
2023-05-08 08:03:08 -07:00
Kirill Mikhailov
9493b38a1b Started adding ESP32-H2 support (#482) 2023-05-08 08:03:08 -07:00