Commit Graph

1268 Commits

Author SHA1 Message Date
32b89eeba1 net: remove atomic-polyfill. 2023-10-12 02:07:26 +02:00
b91d1eaca0 stm32/rcc: add LSE/LSI to all chips, add RTC to more chips. 2023-10-11 04:12:38 +02:00
d0d0ceec6a stm32/rcc: rename HSE32 to HSE 2023-10-11 01:06:44 +02:00
0cfa8d1bb5 stm32/rcc: use more PLL etc enums from PAC. 2023-10-11 00:12:33 +02:00
e62bf6a9fd Patch tests & examples 2023-10-09 13:46:56 +02:00
6186fe0807 stm32/rcc: use PLL enums from PAC. 2023-10-09 02:48:22 +02:00
85c6f23dcb Merge pull request #2018 from jamesmunns/add-derives
Add some uncontroversial derives to Error types
2023-10-07 00:03:10 +00:00
3bf8e4de5f Merge pull request #2015 from willglynn/stm32u5_faster_clocks
stm32: u5: implement >55 MHz clock speeds
2023-10-06 23:38:15 +00:00
3a8e0d4a27 stm32: implement MCO for all chips. 2023-10-07 01:15:24 +02:00
f01609036f h7: implement RTC and LSE clock configuration 2023-10-06 13:28:30 -05:00
930b8f3495 Add some uncontroversial derives to Error types 2023-10-06 17:45:35 +02:00
38e7709a24 stm32: u5: implement >55 MHz clock speeds
This commit allows STM32U5 devices to operate at 160 MHz.

On STM32U5, MSIS can run at 48 MHz and HSE can reach 50 MHz. Faster
clocks require using PLL1's R output, though PLL1 can serve other
functions besides using the R output for the system clock. This commit
extracts a public `PllConfig` struct, primarily to place associated
constructors on that type, but also with an eye towards enabling the P
and Q outputs in a later commit.

STM32U5 PLLs have various frequency requirements on each stage: after
the `m` prescaler, after the `n` multiplier, and after the `r` divider.
This commit implements the associated checks as assertions.

This commit fixes clock calculation and PLL register configuration
errors in PLL initialization.

STM32U5 has a PWR peripheral which can be configured to push Vcore into
different voltage ranges. System clocks exceeding 55 MHz require range
2, and system clocks exceeding 110 MHz require range 1. This commit
adds `voltage_range` to `Config` and configures PWR as directed.

The voltage range implies different performance limits on various clock
signals, including inside a PLL. This commit implements voltage range
<-> frequency range checks as assertions, and extracts the
otherwise-repeated MSIS, HSI16, and HSE initialization into private
methods on `Config`.

STM32U5 frequencies above 55 MHz require using the PWR EPOD booster.
The EPOD booster requires configuring a second `m` term for PLL1,
`mboost`, such that it falls in a particular range. (Recall that >50
MHz cannot be reached without PLL1, so there is no scenario where EPOD
is needed but PLL1 is not.) This commit configures and enables the EPOD
booster automatically as required.
2023-10-05 22:13:27 -05:00
e1a0635ca3 stm32: update metapac and fix opamp ch 2023-10-04 16:15:08 -05:00
0324cee0ca update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
e561e673c2 stm32: add opamp mod and update pac 2023-10-03 16:34:13 -05:00
90ade1b311 Add wait for DHCP in rp wifi_tcp_server 2023-10-02 20:10:52 +01:00
a931dfd9ad Update firmware size in rp wifi examples 2023-10-02 20:10:45 +01:00
eb12114345 Remove impl_trait_projections. 2023-10-02 14:00:49 +02:00
f98c8886b2 feat: allow schmitt, slew, and drive strength be set from Flex, Input, Output
Allows the schmitt, slew and drive strength to be set from Flex. Input and Output[OpenDrain] also expose the appropriate setters.
2023-10-01 21:49:14 -04:00
08175f191a bump wasm-pack version 2023-09-30 05:42:59 +00:00
8da987cfbb typo 2023-09-30 05:34:22 +00:00
f1e7205055 stm32/rtc: enable lse in examples. 2023-09-30 00:18:30 +02:00
79146c4bd5 stm32/adc: cleanup f1, f3, v1, and v2 2023-09-27 20:58:46 -05:00
5d8817d109 stm32/usart: return error instead of panicking on bad baudrate. 2023-09-26 00:19:27 +02:00
70acc093dd Update rust-lorawan crate versions. 2023-09-25 10:45:53 -05:00
7d5e62d4a7 Update for rust-lorawan and lora-phy version 2. 2023-09-24 10:33:03 -05:00
347ff18644 stm32: fix rtc example
lsi must be enabled otherwise a assertion fails
2023-09-24 01:11:58 -04:00
83b4c01273 stm32/rcc: unify h5 and h7. 2023-09-21 23:47:56 +02:00
d46920dce6 stm32/adc: make v1 async and leave en 2023-09-20 16:07:35 -05:00
b1abaa380f Merge pull request #1919 from xoviat/adc
adc/f3: add async conversion
2023-09-18 21:32:59 +00:00
e640933e2f stm32/adc: add async conversion 2023-09-18 16:31:20 -05:00
4bfbcd6c72 stm32: use PAC enums for VOS. 2023-09-18 03:15:15 +02:00
3ddc9cd110 Merge pull request #1915 from xoviat/rcc
stm32/rcc: convert bus prescalers to pac enums
2023-09-16 22:59:26 +00:00
de2773afdd stm32/rcc: convert bus prescalers to pac enums 2023-09-16 17:41:11 -05:00
2930be5e17 Merge pull request #1916 from wkf/main
Update stm32wb examples to use ble/mac firmware.
2023-09-16 20:43:02 +00:00
09f087e53e Update stm32wb examples to use ble/mac firmware. 2023-09-16 16:32:25 -04:00
8315cf064e stm32: add stm32wba support. 2023-09-16 04:04:45 +02:00
1b20ba27b1 feat: bump embassy-sync version to 0.3.0
Update changelog in preparation for release
2023-09-14 18:26:00 +02:00
dcd1a91966 stm32: bump fmc version 2023-09-14 14:07:15 +02:00
1133cbf90e Merge pull request #1834 from dave-andersen/main
Fix timing on RP2040 pio_ws2812.rs example
2023-09-10 21:21:06 +00:00
8201979d71 Add example, fix small bug in respond_and_fill 2023-09-10 23:01:15 +02:00
08415e001e stm32/f3: add high res for hrtim and misc. 2023-09-10 13:33:17 -05:00
a47fb42962 Merge pull request #1878 from xoviat/adc
stm32: fix adc f3 and example
2023-09-10 03:02:42 +00:00
70a4a193c5 stm32: fix adc f3 and example 2023-09-09 22:01:51 -05:00
2132afb48b Merge pull request #1874 from JuliDi/eth-getstatus-async
embassy-net: add async wait_config_up
2023-09-09 20:06:52 +00:00
11a78fb1e4 rcc: more cleanup 2023-09-08 18:20:58 -05:00
cf2d4eca7c add wait_config_up to examples 2023-09-08 17:40:20 +02:00
7573160077 Merge branch 'main' of https://github.com/embassy-rs/embassy into adc-g4 2023-09-05 17:02:28 -05:00
f502271940 stm32: add initial adc f3 impl 2023-09-05 16:46:57 -05:00
49ba9c3da2 initial support for STM32G4 ADC 2023-09-04 23:36:41 -07:00