Commit Graph

634 Commits

Author SHA1 Message Date
Scott Mabin
5a5eb41411 simplify timg time driver impl
Once the timer has been initialized, all other operations are atomic.
Therefore we can simply `steal` the timer where needed, instead of
holding it in a mutex/refcell.
2023-05-10 07:10:16 -07:00
bjoernQ
b77d05f009 Add a PR template 2023-05-10 08:35:42 +02:00
bjoernQ
a7a29eb8b5 Add ESP32-S3 PSRAM feature to CHANGELOG.md 2023-05-10 08:35:32 +02:00
Jesse Braham
36fc6347c2 Add missing link to README 2023-05-09 10:34:22 -07:00
Jesse Braham
c5d8cc62b8
Merge pull request #513 from esp-rs/feature/esp32h2
Add initial support for the ESP32-H2
2023-05-09 10:06:32 -07:00
Björn Quentin
94b909fcb8
Merge pull request #517 from bjoernQ/feature/ESP32-S3-PSRAM
ESP32-S3: Initial PSRAM Support
2023-05-09 12:39:24 +02:00
bjoernQ
f0882e8d62 ESP32-S3: Initial PSRAM Support 2023-05-08 17:38:33 +02: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
Kirill Mikhailov
ad0b4e4bef Update CI
Comment direct-boot test, still only buildable, but requires fixes for Real HW
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
Sergio Gasquez Arcos
854e52c417 Add ESP32- H2 soc/efuse methods (#486)
* feat:  Implement efuse methods

* feat:  Add NUM_PINS

* doc: Update link to point at specific commit

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>

---------

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
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
liebman
905c0af154
implement fetching the RTC timer value in milliseconds and mircroseconds (#476)
* implement fetching the rtc timer value in miliseconds and mircroseconds

* fmt cleanup

* add rtc_time examples

* get_time_raw/esp32: delay 1us between time update checks like esp-idf

* cargo fmt
2023-05-08 07:59:37 -07:00
Scott Mabin
1731169112
Async serial write (#510)
* Initial async_{write|flush} implementations

- ESP32C3 + UART0 example

* Support UART1 & UART2

* Add examples for all chips

* reduce number of wakers depending on uart count
2023-05-05 09:05:15 -07:00
onsdagens
fe84e74151
Adding priority based interrupt preemption (#448)
* Software interrupt support added, not sure if the code is good

* Added support for remaining SW interrupts

* Added support for remaining SW interrupts

* Added support for remaining SW interrupts

* Added support for esp32c2, esp32s2, esp32s3

* Added support for esp32c2, esp32s2, esp32s3

* Added support for esp32c2, esp32s2, esp32s3

* Added support for esp32c2, esp32s2, esp32s3

* Software interrupt example for esp32c3

* Added support for esp32c2, esp32s2, esp32s3

* Software interrupt example for esp32c3

* prio based preemption only, vector table reverted

* prio based preemption only, vector table reverted

* fixed a rare bug causing misaligned memory accesses

* fixed a rare bug causing misaligned memory accesses

* fixed a rare bug causing misaligned memory accesses

* fixed rare bug causing misaligned memory access when emulating atomics

* fixed a rare bug causing misaligned memory accesses

* fixed a rare bug causing misaligned memory accesses

* broke something

* broke something

* fixed alignment bug

* Tentative: added support for interrupt preemption without involving the rt

* Added feature enabling priority based interrupt preemption

* Fixed failed merge

* Tagged preemption helpers with inline always

* Disable interrupts before restoring context to avoid ruining it

* Fix max priority edge case

* Fix broken merge

* Added examples for the remaining RISC-V ESPs

* Update esp-hal-common/src/interrupt/riscv.rs

Co-authored-by: sethp <seth.pellegrino@gmail.com>

* Update esp32c2-hal/examples/interrupt_preemption.rs

Co-authored-by: sethp <seth.pellegrino@gmail.com>

* Update esp-hal-common/src/interrupt/riscv.rs

Co-authored-by: sethp <seth.pellegrino@gmail.com>

* Example comments courtesy of @sethp

* Reverted irrelevant changes, raised high prio interrupt to max prio

* Rolling back an irrelevant change

* Rolling back an irrelevant change

* Update esp-hal-common/src/interrupt/riscv.rs

Co-authored-by: Scott Mabin <scott@mabez.dev>

* Update esp-hal-common/src/interrupt/riscv.rs

Co-authored-by: Scott Mabin <scott@mabez.dev>

* Moved imports to avoid warnings, moved functions to ram, moved interrupt disable to before prio threshold is restored

* Added preemption for the ESP32C6

* Moved helper functions into the relevant modules, changed threshold for ESP32C6 to machine mode one

* ESP32C6 Threshold register changed to machine mode one, corrected threshold set.

---------

Co-authored-by: sethp <seth.pellegrino@gmail.com>
Co-authored-by: Scott Mabin <scott@mabez.dev>
2023-05-05 11:40:54 +01:00
Björn Quentin
00407252d4
Merge pull request #509 from i404788/i2c1_fix
I2C generic signals to fix I2C1 (#508)
2023-05-04 15:47:19 +02:00
ferris
6131084c31 rustfmt 2023-05-04 14:34:19 +02:00
ferris
0e797de19a I2C generic signals to fix I2C1 (#508) 2023-05-04 13:55:07 +02:00
Björn Quentin
13acedf69a
ESP32: Initial PSRAM Support (#506)
* ESP32: Initial PSRAM Support

* Update CHANGELOG, fmt
2023-05-04 12:21:24 +01:00
Björn Quentin
16217b6089
DMA-enable SPI3 on ESP32-S3 (#507)
* DMA-enable SPI3 on ESP32-S3

* Make sure to use Spi3Peripheral marker only on S3
2023-05-04 11:40:17 +01:00
Jesse Braham
9dba3615ed New releases for all packages 2023-05-02 09:17:29 -07:00
Jesse Braham
ecd7fdde7f
Use published release of embassy-executor (#503) 2023-05-02 15:33:13 +01:00
Jesse Braham
6fdc1ea5de
Implement embedded_hal_nb::serial::* traits for UsbSerialJtag (#498)
* Implement `embedded-hal-nb` serial traits for `UsbSerialJtag`

* Fix warnings in `usb_serial_jtag` examples
2023-05-02 12:14:15 +01:00
Jesse Braham
5d073cf56f Add a CHANGELOG 2023-04-27 09:56:41 -07:00
Björn Quentin
a950a3ba32
Merge pull request #493 from bjoernQ/feature/ESP32-S2-PSRAM
ESP32-S2 PSRAM Support
2023-04-26 08:55:19 +02:00
bjoernQ
42bdb9e930 Reformat Cargo.toml after rebase 2023-04-25 16:51:59 +02:00
bjoernQ
69d259f597 Call common_init on all targets 2023-04-25 16:50:26 +02:00
bjoernQ
a9f69b29d8 Add bare-bones PSRAM support for ESP32-S2 2023-04-25 16:47:57 +02:00
Björn Quentin
e3c1b93c20
Merge pull request #492 from jessebraham/fixes/generics
Remove unnecessary generic from `UsbSerialJtag` driver
2023-04-25 07:54:44 +02:00
Jesse Braham
304e0116d7 Remove unnecessary generic from UsbSerialJtag driver 2023-04-24 09:19:49 -07:00
icedrocket
2b662a8486 doc: remove #[doc(inline)] from esp-hal-common re-exports 2023-04-24 06:35:34 -07:00
Jesse Braham
5c5d7f9876
Update embedded-hal-async and embassy-* dependencies (#488)
* Update all dependencies to their latest versions

* Update `embassy-executor` and add new required features
2023-04-21 07:48:25 -07:00
Jesse Braham
5950a043c0
Update to embedded-hal@1.0.0-alpha.10 and embedded-hal-nb@1.0.0-alpha.2 (#487)
* Update `embedded-hal-1` and `embedded-hal-nb` dependencies to latest versions

* Update the `Delay` and `I2c` trait implementations

* Update the `SpiDevice` trait, implement `SpiDeviceRead` and `SpiDeviceWrite`
2023-04-21 06:52:06 -07:00
Björn Quentin
e01a569c69
Merge pull request #474 from BryanKadzban/add-open-drain
Let users configure the LEDC output_pin as open-drain
2023-04-20 17:00:33 +02:00
Björn Quentin
ab79b142f7
Add DEBUG-ASSIST functionality (#484)
* Add DEBUG-ASSIST functionality

* Reformat `lib.rs`

* Reformat ESP32-C2 example
2023-04-20 07:38:55 -07:00
Bryan Kadzban
ec4362561a Fix missing semicolon 2023-04-20 02:46:20 -07:00
Björn Quentin
3fa71b2099
Merge pull request #426 from onsdagens/main
Added API to raise and reset software interrupts
2023-04-18 14:18:45 +02:00
onsdagens
a0a47a4add Fixed comments 2023-04-18 13:48:01 +02:00
onsdagens
dd1be32387 Fixed comments 2023-04-18 13:47:49 +02:00
onsdagens
613136a5ef Fixed comments 2023-04-18 13:20:00 +02:00
Bryan Kadzban
9c78a9c6c9 Fix ledc example code for non-esp32c3 devices 2023-04-17 13:56:40 -07:00
onsdagens
f999d68071
Merge branch 'esp-rs:main' into main 2023-04-17 10:48:05 +01:00
Björn Quentin
4b42f27a4f
Merge pull request #480 from bjoernQ/use-nightly-2023-03-09-in-ci
Pin nightly to 2023-03-09
2023-04-17 08:57:04 +02:00
bjoernQ
56a6910780 Pin nightly to 2023-03-09 to workaround a problem with embedded-hal-async in CI 2023-04-17 08:18:31 +02:00
Bryan Kadzban
9d85bc2ffe Fix ledc example to specify a push-pull output 2023-04-16 20:37:27 -07:00
Bryan Kadzban
a48ba52107 Fix rustfmt 2023-04-16 20:32:58 -07:00