Commit Graph

4029 Commits

Author SHA1 Message Date
5c42ca13bd Merge #1353
1353: Add empty test binary for riscv r=Dirbaio a=royb3

As discussed with `@Dirbaio,` this empty test binary should cause a build to fail when it is not possible to build or link a riscv binary.

Co-authored-by: Roy Buitenhuis <roy.buitenhuis@technolution.nl>
2023-04-11 16:20:08 +00:00
f426c47747 Remove empty line, causing build issues. 2023-04-11 17:40:05 +02:00
6e947c83b6 Move linker flags to build script. 2023-04-11 17:22:47 +02:00
e183801957 Rustfmt 2023-04-11 17:04:25 +02:00
00258bca43 Add empty test binary for riscv 2023-04-11 16:53:04 +02:00
813bba200f Merge #1352
1352: re-export main_riscv macro as main for riscv arch. r=Dirbaio a=royb3

embassy_executor::main was missing for riscv targets.

Co-authored-by: Roy Buitenhuis <roy.buitenhuis@technolution.nl>
2023-04-11 13:05:31 +00:00
32836129f6 re-export main_riscv macro as main for riscv arch. 2023-04-11 14:59:38 +02:00
f06554cf1d Merge pull request #1351 from embassy-rs/c0-hil
stm32/tests: add C0 hil tests.
2023-04-11 14:53:36 +02:00
f5df567619 stm32/test: add C0 hil tests. 2023-04-11 14:16:32 +02:00
35a34afbc2 Update nightly. 2023-04-11 13:38:36 +02:00
b150b9506b Merge #1350
1350: Fix duplicate package name `embassy-stm32h7-examples` r=lulf a=sgoll

This uses the correct package name for the `stm32h5` example.

Fixes #1349 

Co-authored-by: Sebastian Goll <goll@hmi-project.com>
2023-04-11 10:08:58 +00:00
ab6179fb07 Fix duplicate package name 2023-04-11 12:03:08 +02:00
636a3d05c2 Merge #1331
1331: Let bootloader partition be u32 r=rmja a=rmja

This is probably controversial but hear me out:)

The idea about changing from usize to u32 is to enable support for 16 bit mcu's with large flash, e.g. MSP430F5529. Its usize is only 16 bit, but its flash is larger than 64k. Hence, to address its entire flash, it needs the flash address space to be u32.

Missing from the PR is `update_len` in the verification methods. There is currently [a different PR](https://github.com/embassy-rs/embassy/pull/1323) that contains changes in those methods, and I will align depending on the merge order of the two.

The general distinction between u32 and usize is:
* If it is a size or address that only ever lives in flash, then it is u32.
* If the offset or size is ever representable in memory, then usize.

Co-authored-by: Rasmus Melchior Jacobsen <rmja@laesoe.org>
2023-04-11 06:17:00 +00:00
d3ce64254a Let update_len be u32 2023-04-11 07:46:05 +02:00
d8c92c53d6 Merge remote-tracking branch 'upstream/master' into u32-partition 2023-04-11 07:36:23 +02:00
1f25d2ba83 Merge pull request #1347 from embassy-rs/h5-spi
stm32h5: add spi support, fix DMA hang, add HIL tests.
2023-04-10 21:27:44 +02:00
cae683cd41 stm32: update pac. 2023-04-10 21:12:48 +02:00
53c60df997 Merge #1346
1346: fix I2C controller problems after NACK r=Dirbaio a=Juravenator

While tinkering with I2C on a NUCLEO-H723ZG, I noticed that when trying to communicate with a non-existent device you do receive a proper NACK error, but afterwards any future communications with any device no longer works as expected.

The use case is auto-detection of devices, in this case a series of Adafruit 24LC32 I2C EEPROM boards.

On closer inspection with a logic analyzer, I observed that after the NACK, any data bytes sent out by the board to the devices are just zeros. Even though the embassy code specifies the correct data in `set_txdata` in `write_internal`. Something seems to be going wrong with the controller or buffers on the board itself.

Then I noticed what seems to be a logic error in `flush_txdr`, which is called when issuing a NACK.

After flipping the if statement, I2C communications keep working as expected after issuing a NACK.

Co-authored-by: Glenn Dirkx <glenn.dirkx@gmail.com>
2023-04-10 14:49:12 +00:00
6760258ec3 fix I2C controller problems after NACK 2023-04-10 16:20:47 +02:00
dbfd28130f stm32/test: add h5 hil tests. 2023-04-10 15:25:11 +02:00
4ef8e008e8 stm32/spi: add v4/v5 support (for H5). 2023-04-10 15:25:11 +02:00
44b7fe45e2 stm32/gpdma: fix race condition when resetting channel when done. 2023-04-10 15:11:07 +02:00
df17a88448 Merge #1342
1342: feat(rp): add `Wait` impl to `OutputOpenDrain` r=Dirbaio a=TheLostLambda

A while ago `OutputOpenDrain` was made to implement `InputPin`, something that allowed drivers for various one-wire protocols to be written, but it's been lacking a `Wait` implementation — something that's needed to write async versions of these drivers.

This commit also adds `get_level()` to `OutputOpenDrain`, since `is_high()` and `is_low()` were already implemented, but `get_level()` itself was missing.

Co-authored-by: Brooks J Rady <b.j.rady@gmail.com>
2023-04-09 20:50:08 +00:00
dee8c71a2d lora: fix embassy docs build. 2023-04-09 22:40:09 +02:00
1fbb8f0b32 feat(rp): add Wait impl to OutputOpenDrain
A while ago `OutputOpenDrain` was made to implement `InputPin`,
something that allowed drivers for various one-wire protocols to be
written, but it's been lacking a `Wait` implementation — something
that's needed to write async versions of these drivers.

This commit also adds `get_level()` to `OutputOpenDrain`, since
`is_high()` and `is_low()` were already implemented, but `get_level()`
itself was missing.
2023-04-09 09:15:57 +01:00
047ea9066f Merge #1335
1335: Misc stm32 fixes r=Dirbaio a=Dirbaio

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2023-04-07 00:29:18 +00:00
f38899728c stm32: add h5 flavor. 2023-04-07 02:28:36 +02:00
8469a2409c stm32/otg: add U5 support. 2023-04-07 02:28:36 +02:00
dee1d51ad3 stm32: remove subghz feature.
It's available only on WL. if you're using a WL, you want subghz for sure.
2023-04-07 02:28:36 +02:00
da8258b767 Merge #1330
1330: stm32/pwm: add complementary pwm r=Dirbaio a=xoviat

This implements complementary PWM with dead time on many supported targets. The specific dead-time programming functions are passed through directly to the user, which is a bit ugly but the best compromise I could reach for now.

Co-authored-by: xoviat <xoviat@users.noreply.github.com>
2023-04-06 21:33:17 +00:00
60809edf2c Merge #1306
1306: Update embedded-hal r=Dirbaio a=Dirbaio

- [x] Wait for merge https://github.com/rust-embedded/embedded-hal/pull/443
- [x] Wait for release
- [x] embassy-embedded-hal
- [x] embassy-nrf
- [x] embassy-stm32
- [x] embassy-rp

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2023-04-06 21:06:54 +00:00
be37eee13d Update embedded-hal crates. 2023-04-06 22:41:50 +02:00
c9b7dbc541 Merge #1334
1334: executor: fix doc features. r=Dirbaio a=Dirbaio

Forgot to update them in #1321 

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2023-04-06 20:40:17 +00:00
e2516bba09 executor: fix doc features. 2023-04-06 22:39:36 +02:00
f3ec6080bf Merge #1332
1332: executor: Replace unsound critical sections with atomics r=Dirbaio a=GrantM11235

I couldn't figure out the correct orderings, so I just left them as SeqCst for now.

Co-authored-by: Grant Miller <GrantM11235@gmail.com>
2023-04-06 18:01:21 +00:00
89279dcdc9 Merge #1333
1333: STM32: Adc V1 r=Dirbaio a=GrantM11235

Based on #947

Co-authored-by: Matthew W. Samsonoff <matt.samsonoff@gmail.com>
Co-authored-by: Grant Miller <GrantM11235@gmail.com>
2023-04-06 17:16:50 +00:00
d9696bd212 Merge pull request #1300 from embassy-rs/h5
Add support for STM32H5.
2023-04-06 19:14:02 +02:00
611d023829 stm32: add H5 support. 2023-04-06 18:59:37 +02:00
9f28d80977 stm32/usb: add support for 32bit usbram. 2023-04-06 18:59:37 +02:00
52cab3a9f4 Merge #1323
1323: Add hash functions to FirmwareUpdater r=Dirbaio a=rmja

This adds support for computing any hash over the update in the dtu area by providing a closure to the hash update function.

Co-authored-by: Rasmus Melchior Jacobsen <rmja@laesoe.org>
2023-04-05 23:43:24 +00:00
31ef783ac1 stm32/pwm: fix unused import 2023-04-05 18:18:05 -05:00
9f1dac3f5d stm32/pwm: add complementary pwm example 2023-04-05 18:07:07 -05:00
7677268319 stm32/pwm: cleanup and fix complementary pwm 2023-04-05 17:50:23 -05:00
0ef419bee4 Change ADC1 to ADC 2023-04-05 16:52:32 -05:00
92e96bd601 Fix typo 2023-04-05 16:38:06 -05:00
7c53ebd576 Fix example reference voltage 2023-04-05 16:28:28 -05:00
20e7b5e296 InternalChannel 2023-04-05 16:11:21 -05:00
37d8f2e512 Properly enable and reset adc 2023-04-05 15:28:42 -05:00
efd9e18321 Fix example 2023-04-05 15:12:27 -05:00
f588105429 wip 2023-04-05 15:01:31 -05:00