1104 Commits

Author SHA1 Message Date
dimpolo
0fa3214971
MCPWM deadtime improvements (#1378)
* MCPWM deadtime improvements

* allow changing deadtime config after pin creation
* constify DeadTimeCfg
* fix some wrong bit values
* remove some unsafe blocks

* fix some typos

* enable PwmPin as a last configuration step

* introduce mcpwm::operator::LinkedPins and move deadtime related method there

* Typo

* variant() -> bits()

* formatting

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-04-17 09:23:31 +00:00
Björn Quentin
803fbb4d94
Use AlignmentHelper for AES (#1458)
* Use `AlignmentHelper` for AES

* Make Clippy smile
2024-04-17 09:00:42 +00:00
Juraj Sadel
000617b876
esp32: fix ledc (#1457)
* esp32: fix ledc

* changelog
2024-04-17 07:39:10 +00:00
Kirill Mikhailov
17492f6b62
Support 192 and 256-bit keys for AES (#1316)
* Support 192 and 256-bit keys for AES

* quick fix

* Not `panic`ing on wrong key length

* fmt + hil

Update comment

* Add more doc comments

* Use `Key` enum for DMA mode

fix

* API fix: make some critical functions private

* Use `Into<Key>` instead of forcing users to call funcs with `key.into()`
2024-04-16 16:51:25 +00:00
Jesse Braham
3c2dccd51c
Move the esp-alloc package into the repository (#1449) 2024-04-16 15:11:05 +00:00
Björn Quentin
2a750dfedc
Use esp-synopsys-usb-otg 0.4.1 (#1452) 2024-04-16 15:00:25 +00:00
Björn Quentin
e368be0565
Turn some not-too-useful TODOs into useful documentation (#1451) 2024-04-16 14:46:27 +00:00
Scott Mabin
48ced47874
fixmes be gone (#1448) 2024-04-16 13:52:45 +00:00
Scott Mabin
89a3d56b15
Adding errors for receive and transmit read/write async (#1445)
* Adding errors for receive and transmit read/write async

* rebase and fix ups

---------

Co-authored-by: konsulten <nordmarkclaes@gmail.com>
2024-04-16 13:22:15 +00:00
Sergio Gasquez Arcos
1a5ca65eed
Enable S3 HIL (#1338)
* feat: Add HIL support for S3

* ci: Add dummy s3 job

* test: Filter interrupt test for Xtensa devices

* ci: Install Xtensa toolchain
2024-04-16 12:09:18 +00:00
Jesse Braham
586744070b
Remove some #[allow] attributes and an unused function (#1440)
* Remove TODO comments from linker scripts for ESP32-C6/H2

* Small refactor in Xtensa interrupt module to get rid of some allow attributes

* Remove unused function and attribute from `esp-hal-procmacros`
2024-04-16 10:45:57 +00:00
Jesse Braham
66cab5dfb4
Update to latest (unpublished) PACs and fix all breaking changes (#1439) 2024-04-16 10:45:45 +00:00
Sergio Gasquez Arcos
6b742968b1
Add SPI Full Duplex DMA test (#1443)
* test: Initial SPI Full Duplex DMA tests

* feat: Add timeouts

* tests: Add symestric_transfer_huge_buffer and asymestric_transfer tests

* style: Fix tests names
2024-04-16 10:26:53 +00:00
Scott Mabin
46c8527123
spi housekeeping (#1438) 2024-04-16 06:43:29 +00:00
Sergio Gasquez Arcos
381ce9530c
Clock monitor HIL test (#1425)
* tests: Add clock_monitor HIL test

* feat: Adjust accepted freq ranges

* fix: Get the estimate a second time if its very off

* test: Update ranges and check
2024-04-15 09:54:55 +00:00
Sergio Gasquez Arcos
634191203f
AES DMA HIL Tests (#1426)
* test: Initial AES DMA HIL tests

* test: Cover all the AES modes

* feat: Reset aes at the end of the tests to avoid errors in `aes` test

* feat: Reset the interrupt state when finishing the transform
2024-04-15 09:24:07 +00:00
Sergio Gasquez Arcos
da3375bbe4
test: Cover all aes modes (#1423) 2024-04-11 15:46:15 +00:00
Sergio Gasquez Arcos
5d61074c85
HIL SHA tests (#1422)
* feat: Add missing cfg(test)

* feat: Initial SHA HIL test

* test: Test all the SHA modes
2024-04-11 15:42:15 +00:00
Sergio Gasquez Arcos
a22b817ee5
HIL updates (#1412)
* docs: Document new xtask features

* style: format deps

* feat: enable all the aliases

* feat: Update embedded-tests executors

* feat: Enable running only one test

* feat: Exit if a test fails

* docs: Fix typo in command

* build: Enable xtensa-semihosting in xtensa targets

* feat: Handle probe-rs esp32 chip name

* style: Clippy lints

* revert: Exit if a test fails

* chore: Remove aliases

* feat: Remove unnecesary toogle

* feat: Error if a test fails and print failed tests
2024-04-11 14:04:32 +00:00
Jesse Braham
dfc6d86a58
Warn users when attempting to build esp-hal using the dev profile (#1420)
* Warn users when attempting to build `esp-hal` using the `dev` profile

* Update `CHANGELOG.md`
2024-04-11 13:04:55 +00:00
Jesse Braham
f6925480f2
Remove unused function from esp-hal-procmacros (#1421) 2024-04-11 09:29:29 +00:00
Juraj Sadel
c73a2d91ae
Add HIL test for ECC (#1418)
* Add HIL test for ECC

* review changes: remove forgotten SysTimer in C2 test
2024-04-10 15:16:20 +00:00
Sergio Gasquez Arcos
86f4f50b3e
test: Add CRC and MD5 HIL tests (#1417) 2024-04-10 14:51:12 +00:00
Sergio Gasquez Arcos
02c2825b2c
HIL RSA tests (#1414)
* docs: Update documentation

* test: Add rsa hil test
2024-04-10 14:43:10 +00:00
Björn Quentin
1fdfc9270e
Remove the #[interrupt] macro (#1409) 2024-04-09 10:11:57 +00:00
Björn Quentin
41aa556764
Avoid "missing_transmute_annotations" warnings (#1410) 2024-04-08 11:47:36 +00:00
Kirill Mikhailov
52e5b94bd5
PCNT: Runtime ISR binding (#1396)
* PCNT: Runtime ISR binding

* Changelog entry

* fmt + warnings

* Unify `interrupt_handler` + alignment with latest changes

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-04-05 15:16:11 +00:00
Juraj Sadel
1e6165e04b
Runtime ISR binding and simple public API docs for RTC (#1405)
* Runtime ISR binding and simple public API docs for RTC

* changelog

* import dependencies instead of using full paths
2024-04-05 14:54:13 +00:00
Scott Mabin
315b8cc0ff
HIL xtask support (#1404)
* allow running tests via xtask

* Add run-tests xtask subcommand

* Use xtask in HIL ci
2024-04-05 14:39:20 +00:00
Jesse Braham
fd9f7895f6
Extract inner modules of gpio module into their own files (#1397)
* Extract inner modules of `gpio` module into their own files

* Update `CHANGELOG.md`

* Add missing doc comment in `gpio::lp_io` module

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-04-05 12:33:49 +00:00
Björn Quentin
b3bc28efef
Software interrupts runtime binding (#1398)
* Split software interrupts

* Make swint0 unavailable on a multi_core target when using thread-executor

* Clarify why embassy_multiprio example needs two executors

* Make interrupt-executor require a SoftwareInterrupt<n>

* Improve code

* CHANGELOG.md

* Don't use `#[interrupt]` in thread-executor

* More docs

* Typo fixed
2024-04-05 12:33:21 +00:00
dimpolo
d26b1bd504
xtensa: fix AdcConfig::adc_calibrate (#1379)
Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-04-05 11:44:35 +00:00
dimpolo
2437d82554
fix commented out paths in adc_cal example (#1400) 2024-04-05 09:40:41 +00:00
Markus Kasten
43f284034c
Fix panic when setting LEDC duty cycle to 0 with SetDutyCycle::set_duty_cycle (#1403)
* Fix panic when setting LEDC duty cycle to 0 with `SetDutyCycle::set_duty_cycle`

Fixes #1390

* Update Changelog for #1403
2024-04-05 09:40:15 +00:00
Juraj Sadel
215573a720
Runtime ISR binding and simple public API docs for assist-debug (#1395)
* Runtime ISR binding and simple public API docs for assist-debug

* changelog

* actually use runtime ISR in example

* revert MODE generic argument
2024-04-04 15:08:12 +00:00
Jesse Braham
bf2cca90be
Provide native APIs for I2C/SPI functionality currently handled by embedded-hal@0.2.x traits (#1386)
* Provide native APIs for SPI functionality currently handled by `embedded-hal` traits

* Provide APIs for I2C functionality currently handled by `embedded-hal` traits

* Rebase and update HIL test for SPI to get it building again
2024-04-04 14:09:35 +00:00
Björn Quentin
bd9808827f
Make sure to enable the GPIO interrupt (#1394)
* Make sure to enable the GPIO interrupt

* Refactor GPIO constructors
2024-04-04 11:24:38 +00:00
Jesse Braham
839a3ba62b
Use PAC instead of volatile writes in rtc_cntl::rtc for ESP32-H2 (#1387) 2024-04-04 10:41:31 +00:00
Jesse Braham
000ed9affc
Refactor the ADC driver, allow use without embedded-hal@0.2.x traits (#1391)
* Reduce duplication of code within the `analog::adc` module

* Add a public `read_oneshot` method to the ADC driver

* Do not require `embedded-hal@0.2.x` traits for ADC examples

* Add doc comments to all public methods which do not already have them
2024-04-04 10:35:25 +00:00
Scott Mabin
b8ca1323d0
Remove remaining references to embedded-hal-02 for GPIO examples (#1392) 2024-04-04 10:33:23 +00:00
Scott Mabin
969f9a15f6
Build HIL in CI prior to running them (#1388)
* xtask: allow building hil tests

* check hil tests build in CI
2024-04-03 17:07:46 +00:00
Zgarbul Andrey
13c81177c5
inherent gpio methods (#1284) 2024-04-03 16:47:47 +00:00
Björn Quentin
ba73154c36
Runtime ISR binding for TWAI (#1384)
* Runtime ISR binding for TWAI

* CHANGELOG.md

* Fix EH-0.2 TWAI implementation
2024-04-03 13:46:21 +00:00
Björn Quentin
efcf7d4074
Don't use #[interrupt} in the serial_interrupts.rs example (#1385) 2024-04-03 13:14:35 +00:00
Björn Quentin
256d7198f9
Timers runtime isr binding (#1348)
* Runtime ISR binding for TIMG/SYSTIMER

* CHANGELOG.md

* Implement `set_interrupt_handler` only for blocking

* Adapt HIL test
2024-04-03 08:14:27 +00:00
Markus Kasten
81a40703bd
Flush in spi::master::Instance::write before attemting any writes (#1381)
* Flush in `spi::master::Instancee::write` before attemting any writes

Otherwise subsequent calls to `SpiBus::write` will cause corrupted writes
and break `embedded-hal-bus`es transactions. Fixes #1369.

* Update Changelog for #1381

* Fix missing result handling when calling `flush()` in SPI `Instance::write_bytes`
2024-04-03 00:55:40 +00:00
Jesse Braham
55864b1ba7
UsbSerialJtag: async/blocking constructors, runtime interrupt binding support (#1377)
* Refactor `usb_serial_jtag` driver to take an operational mode as a generic parameter

* Update module documentation

* Update `CHANGELOG.md`
2024-04-02 23:45:14 +00:00
Jesse Braham
e4c985e8dd
Eliminate the rt and vectored features from the esp-hal package (#1380)
* Eliminate the `vectored` feature

* Eliminate the `rt` feature

* Update `CHANGELOG.md`

* Fix typo in comment
2024-04-02 23:21:39 +00:00
Björn Quentin
4aca01a7b6
I2C runtime ISR binding (#1376)
* I2C runtime ISR binding

* CHANGELOG.md
2024-04-02 18:03:36 +00:00
Scott Mabin
21d833d2a3
Refactor testing, add defmt, add async gpio test (#1363)
* Refactor testing, add defmt, add async gpio test

* Add test to ensure the some edge case pins can be used in async mode

* Add test for pin0

* clippy

* update test to use constants extracted from esp-idf's soc module

* address review comments

* simplify test to just initialize one pin as async

* changelog
2024-04-02 15:28:15 +00:00