Commit graph

4160 commits

Author SHA1 Message Date
Jacob Davis-Hansson
81f10e136a outover instead of inover 2023-04-15 15:13:44 +02:00
bors[bot]
1fdce6e52a
Merge #1360 #1361
1360: stm32/rcc: add i2s pll on some f4 micros r=Dirbaio a=xoviat

Adds the i2s pll on some f4 micros. 

1361: Executor: Replace unnecessary atomics in runqueue r=Dirbaio a=GrantM11235

Only the head pointer needs to be atomic. The `RunQueueItem` pointers are only loaded and stored, and never concurrently

Co-authored-by: xoviat <xoviat@users.noreply.github.com>
Co-authored-by: Grant Miller <GrantM11235@gmail.com>
2023-04-15 10:38:28 +00:00
xoviat
f395ec44e8 stm32/rcc: add pllsai clock 2023-04-14 21:28:27 -05:00
Ulf Lilleengen
63941432e3 Update to rust-lorawan with afit support 2023-04-15 01:00:12 +02:00
bors[bot]
be0f93ff37
Merge #1368
1368: AFIT cleanup r=Dirbaio a=Dirbaio

bors r+

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
2023-04-14 22:59:49 +00:00
Dario Nieuwenhuis
224eaaf797 stm32/sdmmc: switch to AFIT. 2023-04-15 00:58:58 +02:00
Dario Nieuwenhuis
f681b9d4e5 Remove the _todo_embedded_hal_serial impls. EH will probably not have these serial traits. 2023-04-15 00:58:58 +02:00
xoviat
650589ab3f stm32/rcc: add plli2s to Clocks and cfg directives 2023-04-14 16:30:36 -05:00
Jacob Davis-Hansson
b9fc2a6b33 Add ability to invert UART pins
This is useful in some cases where the surrounding circuit
for some reason inverts the UART signal, for instance if you're talking
to a device via an optocoupler.
2023-04-14 21:08:24 +02:00
sander
3002ee0dcf embassy-boot: add nightly feature gate for async usage 2023-04-14 11:27:23 +02:00
sander
ce0e1a5db3 Merge commit '82f528927b2fde275c2e9b6fd737baf439cb296a' 2023-04-14 10:44:51 +02:00
Dario Nieuwenhuis
a3ecf5caf6
Merge pull request #1363 from embassy-rs/embassy-time-released
time: remove embassy-sync dep, release v0.1.1
2023-04-14 00:19:33 +02:00
Dario Nieuwenhuis
a7629299f4 Release embassy-time v0.1.1 2023-04-13 23:57:20 +02:00
Dario Nieuwenhuis
e7ff759f1c time: remove dependency on embassy-sync. 2023-04-13 23:57:20 +02:00
Dario Nieuwenhuis
62ecd97350
Merge pull request #1362 from embassy-rs/embassy-sync-v0.2.0
Release embassy-sync v0.2.0
2023-04-13 23:56:32 +02:00
Dario Nieuwenhuis
577f060d24 Release embassy-sync v0.2.0 2023-04-13 23:40:49 +02:00
Grant Miller
6a6c673c5f Executor: Replace unnecessary atomics in runqueue 2023-04-13 14:21:41 -05:00
xoviat
c1d5f86871 stm32/rcc: fix warnings 2023-04-12 18:11:55 -05:00
xoviat
0289630fe4 stm32/rcc: add i2s pll on some f4 micros 2023-04-12 18:04:44 -05:00
bors[bot]
5a03b2e9e8
Merge #1359
1359: Make Hertz constructors `const` r=Dirbaio a=sgoll

This PR makes `Hertz` associated functions `hz()`, `khz()`, `mhz()` and their unassociated variants `const`, allowing `Hertz` to be used more easily in constant values:

```rust
const FREQ1: Hertz = Hertz::khz(120);
const FREQ2: Hertz = mhz(1);
```

This follows the pattern used for similar types such as `Duration` and `Instant`, from `embassy-time/src/duration.rs` and `embassy-time/src/instant.rs`, respectively.

ba8cafb20c/embassy-time/src/duration.rs (L44-L47)

ba8cafb20c/embassy-time/src/instant.rs (L29-L34)

Co-authored-by: Sebastian Goll <sebastian.goll@gmx.de>
2023-04-12 22:13:44 +00:00
Sebastian Goll
4863f88d02 Make Hertz constructors const
This allows them to be used in constant values.
2023-04-13 00:06:14 +02:00
bors[bot]
ba8cafb20c
Merge #1358
1358: Fix typo in derivation of PLLP divisor for STM32F2 family r=Dirbaio a=sgoll

This PR fixes a typo in the derivation of the PLLP divisor for the STM32F2 family.

Fixes #1357 

Co-authored-by: Sebastian Goll <sebastian.goll@gmx.de>
2023-04-12 01:09:41 +00:00
Sebastian Goll
f3699e67b9 Fix typo in derivation of PLLP divisor 2023-04-12 02:07:31 +02:00
Dario Nieuwenhuis
201a038134
Merge pull request #1356 from embassy-rs/peripheralref-no-mut
Do not require mut in PeripheralRef clone_unchecked, make nRF timer `cc()` borrows less strict.
2023-04-12 00:03:46 +02:00
Dario Nieuwenhuis
8fd8ef9ca7 nrf/timer: make cc() borrows less strict. 2023-04-11 23:09:02 +02:00
Dario Nieuwenhuis
9a677ab618 common/peripheral: do not require mut in PeripheralRef clone_unchecked. 2023-04-11 23:09:02 +02:00
bors[bot]
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
Roy Buitenhuis
f426c47747 Remove empty line, causing build issues. 2023-04-11 17:40:05 +02:00
Roy Buitenhuis
6e947c83b6 Move linker flags to build script. 2023-04-11 17:22:47 +02:00
Roy Buitenhuis
e183801957 Rustfmt 2023-04-11 17:04:25 +02:00
Roy Buitenhuis
00258bca43 Add empty test binary for riscv 2023-04-11 16:53:04 +02:00
bors[bot]
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
Roy Buitenhuis
32836129f6 re-export main_riscv macro as main for riscv arch. 2023-04-11 14:59:38 +02:00
Dario Nieuwenhuis
f06554cf1d
Merge pull request #1351 from embassy-rs/c0-hil
stm32/tests: add C0 hil tests.
2023-04-11 14:53:36 +02:00
Dario Nieuwenhuis
f5df567619 stm32/test: add C0 hil tests. 2023-04-11 14:16:32 +02:00
sander
1b86570cfd embassy-boot: readd nightly feature as default 2023-04-11 13:55:19 +02:00
sander
f51cbebffd embassy-boot: add nightly feature gates 2023-04-11 13:49:32 +02:00
sander
c309797488 merge embassy/master 2023-04-11 13:48:34 +02:00
Dario Nieuwenhuis
35a34afbc2 Update nightly. 2023-04-11 13:38:36 +02:00
bors[bot]
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
Sebastian Goll
ab6179fb07 Fix duplicate package name 2023-04-11 12:03:08 +02:00
bors[bot]
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
Rasmus Melchior Jacobsen
d3ce64254a Let update_len be u32 2023-04-11 07:46:05 +02:00
Rasmus Melchior Jacobsen
d8c92c53d6 Merge remote-tracking branch 'upstream/master' into u32-partition 2023-04-11 07:36:23 +02:00
Dario Nieuwenhuis
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
Dario Nieuwenhuis
cae683cd41 stm32: update pac. 2023-04-10 21:12:48 +02:00
bors[bot]
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
Glenn Dirkx
6760258ec3 fix I2C controller problems after NACK 2023-04-10 16:20:47 +02:00
Dario Nieuwenhuis
dbfd28130f stm32/test: add h5 hil tests. 2023-04-10 15:25:11 +02:00
Dario Nieuwenhuis
4ef8e008e8 stm32/spi: add v4/v5 support (for H5). 2023-04-10 15:25:11 +02:00