Commit Graph

1502 Commits

Author SHA1 Message Date
Ulf Lilleengen
be3c70d455
Merge pull request #2417 from vasilNnikolov/mutex_rp_example
Add example of pin sharing between tasks
2024-01-10 07:25:47 +00:00
Dario Nieuwenhuis
495b8b739a Change GPIO inherent methods back to &self.
With the embedded-hal rc3 update I changed them to require `&mut self`, but
in retrospect I think `&self` is better, for extra flexibility.

This PR reverts the changes from the rc3 update to inherent methods.
2024-01-10 00:00:10 +01:00
Vasil Nikolov
4843c060d0 no need for a PeripheralRef 2024-01-10 00:47:45 +02:00
Dario Nieuwenhuis
c9ac39df94 Update embedded-hal to v1.0 2024-01-09 23:37:14 +01:00
Vasil Nikolov
ebf46d37aa remove unused import 2024-01-09 00:35:11 +02:00
Vasil Nikolov
2498fbdf52 add example of pin sharing between tasks 2024-01-09 00:26:48 +02:00
Jomer.Dev
6f505feeb1 Add example 2024-01-08 00:21:02 +01:00
eZio Pan
424ddaf3d9 impl waveform with TIM Channel 2024-01-06 22:22:38 +08:00
Derek Hageman
d34910dbc8 stm32: Add G0 USB example
Add a USB CDC ACM example using STM32G0 USB and CRS.
2024-01-05 07:57:35 -07:00
Scott Mabin
f85898771b New embassy-net release 2024-01-04 16:06:59 +00:00
Dario Nieuwenhuis
87ac51d656
Merge pull request #2396 from tyler-gilbert/update-rcc-u5-with-sai-support
Update STM32 RCC U5 to support P and Q dividers
2024-01-03 17:12:50 +00:00
Tyler Gilbert
31bf127807 Update STM32 RCC U5 to support P and Q dividers 2024-01-03 10:46:45 -06:00
Adin Ackerman
9b47fbeb47 weird format rule 2024-01-02 20:12:58 -08:00
Adin Ackerman
e31dd036fe add hf timer example for g0 2024-01-02 20:03:14 -08:00
Christian Enderle
986eca1b12 fix for rustfmt 2024-01-02 23:24:23 +01:00
Christian Enderle
3830300990 stm32l5: add low-power stop example 2024-01-02 23:05:58 +01:00
Dario Nieuwenhuis
eb7197c5b7 examples: configure executor task arena sizes. 2024-01-02 18:13:25 +01:00
eZio Pan
c276da5fcb ask a DMA Channel only when use .gen_waveform() 2024-01-02 14:01:09 +08:00
eZio Pan
873ee06151 some trivial fix
use less #[cfg] macro; reuse same variable
2023-12-30 12:01:08 +08:00
eZio Pan
8c2a6df03b implement PWM waveform generating with DMA 2023-12-28 20:09:12 +08:00
eZio Pan
d90a97aa4c update metapac after stm32-data PR323
and refactor a few code with cargo clippy
2023-12-25 22:03:32 +08:00
eZio Pan
dcd4e6384e enable output compare preload for TIM
keep output waveform integrity
2023-12-23 19:53:02 +08:00
eZio Pan
2f75ffb233 remove unused feature attribute 2023-12-22 01:31:25 +08:00
eZio Pan
53fc344e4d fix timing, turn TIM UDE on only necessary, clean DMA FEIF after each Transfer 2023-12-22 01:24:31 +08:00
eZio Pan
d7e517e2d3
Merge branch 'main' into stm32f4-example-ws2812-spi 2023-12-22 00:19:00 +08:00
Dario Nieuwenhuis
8b36a32ed5 ci: use beta, add secondary nightly ci. 2023-12-21 15:03:57 +01:00
Ulf Lilleengen
0acf7b09c3 chore: replace make_static! macro usage with non-macro version 2023-12-21 10:29:57 +01:00
Ulf Lilleengen
1c3cf347cb remove embedded-sdmmc
Remove support for embedded-sdmmc due to lack of maintainership. Bring
it back once the upstream includes the async functionality.
2023-12-20 13:25:36 +01:00
Dario Nieuwenhuis
189b15c426 stm32/timer: docs. 2023-12-19 17:35:38 +01:00
Dario Nieuwenhuis
80c9d04bbd stm32: add some docs. 2023-12-18 00:53:18 +01:00
eZio Pan
05b8818de0 typo fix 2023-12-18 01:02:58 +08:00
eZio Pan
1934c2abc8 match up with stm32f429zi feature flag
stm32f429 has less DMA channel than stm32f411
2023-12-18 00:06:32 +08:00
eZio Pan
0a890cfbe7 stm32f4 ws2812 example with spi ...
... and more doc on TIM&DMA version,
also remove useless TIM APRE settings,
and use for loop instead of manually flip the index bit,
and replace `embassy_time::Timer` with `embassy_time::Ticker`, for more constant time interval.
2023-12-17 23:47:00 +08:00
eZio Pan
ea1e1973eb unify channel assign 2023-12-16 02:15:56 +08:00
eZio Pan
77e372e842 cargo fmt 2023-12-15 14:15:45 +08:00
eZio Pan
a165d73eed add ws2812 example for stm32f4 with PWM and DMA 2023-12-15 14:10:11 +08:00
Ulf Lilleengen
5ec2fbe3a2
Merge pull request #2284 from Redrield/feature/embassy-usb-dfu
Add embassy-usb-dfu crate, with related modifications to embassy-boot
2023-12-14 19:56:04 +00:00
Kaitlyn Kenwell
33e8943e5b Rename bootloader feature to dfu 2023-12-14 14:16:58 -05:00
Kaitlyn Kenwell
9f9f6e75bb Abstract chip reset logic, add Reset impls for cortex-m and esp32c3 2023-12-14 13:29:26 -05:00
Kaitlyn Kenwell
cbc8ccc51e Adjust stm32wb-dfu example memory maps to fix linker errors 2023-12-14 10:56:16 -05:00
Kaitlyn Kenwell
27d054aa68 Adjust toml files, fix application example 2023-12-14 10:34:22 -05:00
Kaitlyn Kenwell
a34abd849f Add examples to ci.sh 2023-12-14 10:30:10 -05:00
Dario Nieuwenhuis
d81395fab3 Update embedded-hal to 1.0.0-rc.3 2023-12-14 16:19:32 +01:00
Kaitlyn Kenwell
9cc5d8ac89 fmt 2023-12-14 09:38:49 -05:00
Kaitlyn Kenwell
e27e00f628 Address reviews 2023-12-14 09:36:22 -05:00
Kaitlyn Kenwell
702d2a1a19 Formatting fixes, add example using stm32wb55 2023-12-13 16:08:20 -05:00
Corey Schuhen
3626deecaa More formatting. 2023-12-11 21:26:23 +10:00
Corey Schuhen
b34c8e3eb1 Update formatting. 2023-12-11 21:25:05 +10:00
Corey Schuhen
13af76af88 Add example for using CAN with STM32F103 (BluePill) with a real CAN 2023-12-11 21:08:58 +10:00
Jesse Braham
925f5cbc26 Update all references to embasy-executor to the latest version 2023-12-06 12:05:47 +01:00
Badr Bouslikhin
0ffb35a2a1
stm32/eth: add host server command example 2023-12-05 19:50:11 +01:00
Badr Bouslikhin
d2a7322978
stm32/eth: fix h7 examples
The STM32H7 examples enable `dhcpv4` and `dns` features. Both use one
socket, meaning that we need one extra socket for our firmware tcp
socket.
2023-12-05 19:48:03 +01:00
Scott Mabin
334900752a update release version in examples and other crates 2023-12-04 13:15:10 +00:00
Dario Nieuwenhuis
03325ea81b update embedded-storage{,-async}, remove patch. 2023-12-04 13:48:36 +01:00
Dario Nieuwenhuis
c6989dfbca Remove nightly and unstable-traits features in preparation for 1.75. 2023-11-29 17:26:33 +01:00
Dario Nieuwenhuis
4634316749 Update embedded-(hal,io,nal). 2023-11-29 17:01:36 +01:00
Dario Nieuwenhuis
1b9925e3da Move embassy-lora, lora examples to lora-phy repo. 2023-11-29 16:26:31 +01:00
Adam Greig
09d7950313 STM32 DAC: Rework DAC driver, support all families. 2023-11-25 00:29:45 +01:00
Adam Greig
31fc337e2f STM32 DAC: Swap to new TSEL enum entirely in-HAL 2023-11-25 00:29:45 +01:00
Dario Nieuwenhuis
f5c9e3baa6
Merge pull request #2200 from barnabywalters/asynci2cv1
Implemented async I2C for v1
2023-11-24 23:08:47 +00:00
Barnaby Walters
3efc3eee57 stm32/i2c: implement async i2c v1. 2023-11-24 23:55:46 +01:00
Dario Nieuwenhuis
bc65b8f7ec stm32/i2c: add async, dual interrupt scaffolding. 2023-11-24 23:55:45 +01:00
Dario Nieuwenhuis
259cf6192b executor: Remove non-functional rtos-trace-interrupt. 2023-11-24 23:52:09 +01:00
Dario Nieuwenhuis
766ec77ec5
Merge pull request #2198 from adamgreig/stm32-opamp
STM32: Don't enable opamps in new(), wait until configured
2023-11-20 22:47:19 +00:00
Adam Greig
d1af696605
STM32 opamp: use impl Peripheral instead of directly taking pins 2023-11-20 21:35:05 +00:00
James Munns
f3c77e59c4 Add docs, touch all linker fragments 2023-11-19 23:10:11 +01:00
James Munns
30424d83ff Update RP2040 memory.x
The RP2040 has 264KiB of memory, not 256KiB.
2023-11-19 23:10:11 +01:00
Dario Nieuwenhuis
1f9b649f80 executor: release v0.3.3 2023-11-15 18:44:01 +01:00
Dario Nieuwenhuis
ace5221080 stm32/rcc: unify f2 into f4/f7. 2023-11-13 01:59:33 +01:00
Dario Nieuwenhuis
2376b3bdfa stm32/rcc: fix pll enum naming on f4, f7. 2023-11-13 01:56:50 +01:00
Dario Nieuwenhuis
4fe344ebc0 stm32/rcc: consistent casing and naming for PLL enums. 2023-11-13 00:52:01 +01:00
Dario Nieuwenhuis
4647df14b1 Update heapless to v0.8, embedded-nal-async to v0.7 2023-11-10 16:43:53 +01:00
Dario Nieuwenhuis
0b015bd727 usb: remove msos-descriptor feature. 2023-11-08 23:21:52 +01:00
kalkyl
8effff3383 rp: Remove control handler from USB raw bulk example 2023-11-07 20:45:01 +01:00
Dario Nieuwenhuis
05f983c607
Merge pull request #2158 from kalkyl/usb-bulk
rp: Add USB raw bulk example
2023-11-07 19:22:55 +00:00
kalkyl
d44383e9a7 fmt 2023-11-07 20:19:56 +01:00
kalkyl
37a773c037 Use driver reexport 2023-11-07 20:17:19 +01:00
kalkyl
d1adc93614 rp: Add USB raw bulk example 2023-11-07 19:57:05 +01:00
Dario Nieuwenhuis
78a7ee7ec4
Merge pull request #2157 from kalkyl/usb-raw
rp: Add USB raw example + msos-descriptor to examples and usb-logger
2023-11-07 10:30:52 +00:00
kalkyl
e3fe13e905 Add docs 2023-11-07 10:58:35 +01:00
kalkyl
38bfa6916f Update pio-uart example 2023-11-07 09:15:21 +01:00
kalkyl
50139752bc Add comments 2023-11-07 09:10:18 +01:00
kalkyl
db4cd73894 rp: Add USB raw example + msos descriptor to examples and usb-logger 2023-11-07 09:05:10 +01:00
Adam Greig
326bc98bd2
Update stm32 usb_raw example to use MSOS descriptors for WinUSB 2023-11-07 02:34:27 +00:00
xoviat
980c3cf42b
Merge pull request #2142 from adamgreig/stm32g4-opamp
stm32: support internal output on g4 opamps
2023-11-06 00:01:34 +00:00
Adam Greig
28eb4cd817
stm32: support internal output on g4 opamps 2023-11-05 23:57:15 +00:00
Dario Nieuwenhuis
0272deb158 stm32/rcc: add shared code for hsi48 with crs support. 2023-11-05 23:52:54 +01:00
Adam Greig
fa45dcd034
Add raw USB example using control transfers 2023-11-05 16:46:45 +00:00
Dario Nieuwenhuis
8911a4d855 stm32/rcc: switch to modern api for l0, l1. 2023-11-05 03:06:13 +01:00
kalkyl
649f1a122a Cleanup 2023-11-03 00:41:16 +01:00
kalkyl
413b394d31 rp: Add PWM input example 2023-11-03 00:37:58 +01:00
Dario Nieuwenhuis
7ea2c3508a
Merge pull request #2137 from kalkyl/pio-rotary-encoder
rp: Add PIO rotary encoder example
2023-11-02 21:52:01 +00:00
kalkyl
ec744558b2 Cleanup 2023-11-02 22:37:03 +01:00
kalkyl
44486c5b39 rp: Add PIO rotary encoder example 2023-11-02 21:54:20 +01:00
Dario Nieuwenhuis
1f51367eb9 Upgrade static-cell to v2.0 2023-11-02 21:52:07 +01:00
Dario Nieuwenhuis
e519e00265 Update Rust nightly. 2023-11-01 04:56:56 +01:00
Dario Nieuwenhuis
dd6a29adb2 Release embassy-executor v0.3.1 2023-11-01 00:17:44 +01:00
Dario Nieuwenhuis
74683c706b
Merge pull request #2127 from bugadani/release
Prepare embassy-net 0.2.1 and embassy-sync 0.4.0
2023-10-31 15:57:51 +00:00
Dániel Buga
d941882066 Prepare embassy-net 0.2.1 and embassy-sync 0.4.0 2023-10-31 09:33:27 +01:00
Dario Nieuwenhuis
3f74ff7235
Merge pull request #2123 from bugadani/feature
Re-add impl_trait_projections
2023-10-31 02:26:51 +01:00
kalkyl
c9b50e46a5 rp: Add PIO stepper motor driver example 2023-10-30 20:50:37 +01:00
Dániel Buga
ad07ea0290 Re-add impl_trait_projections 2023-10-30 19:10:45 +01:00
Dario Nieuwenhuis
a39ae12edc stm32/rcc: misc cleanups. 2023-10-23 17:36:21 +02:00
Dario Nieuwenhuis
0ef1cb29f7 stm32/rcc: merge wb into l4/l5. 2023-10-23 17:36:21 +02:00
Dario Nieuwenhuis
b9e13cb5d1 stm32/rcc: merge wl into l4/l5. 2023-10-23 00:31:36 +02:00
Dario Nieuwenhuis
412bcad2d1 stm32: rename HSI16 -> HSI 2023-10-22 22:39:55 +02:00
Dion Dokter
5b3f75dc72 Merge branch 'master' into center-align 2023-10-20 14:17:55 +02:00
Ulf Lilleengen
035800bfbd
Merge pull request #2091 from embassy-rs/comment-memory-x
docs: add linker script comments
2023-10-19 08:19:42 +00:00
Ulf Lilleengen
c7803bb8f4
docs: add linker script comments
Existing comment were outdated. Provide an example configuration
for using the softdevice with the nRF52 examples.
2023-10-19 09:29:20 +02:00
Dario Nieuwenhuis
f20f170b1f stm32/rcc: refactor and unify f4 into f7. 2023-10-18 05:11:31 +02:00
Dario Nieuwenhuis
67010d123c stm32/rcc: refactor f7. 2023-10-18 05:01:11 +02:00
xoviat
bbd12c9372 stm32: update metapac 2023-10-17 20:31:44 -05:00
Dario Nieuwenhuis
b478640463 fix clocks in stm32wl rng example. 2023-10-17 15:57:09 +02:00
xoviat
683d5c3066
Merge pull request #2077 from xoviat/rcc
stm32: update metapac
2023-10-17 01:05:18 +00:00
xoviat
a3574e519a stm32: update metapac 2023-10-16 20:04:10 -05:00
Dario Nieuwenhuis
6e6df22979
Merge pull request #2075 from CBJamo/rosc_example
Add example to show useage of rp2040 rosc
2023-10-16 23:22:06 +00:00
Caleb Jamison
5a1393aa0b Add example to show useage of rp2040 rosc 2023-10-16 16:17:07 -04:00
Dániel Buga
40e4ca4751 Prepare embassy-net(/-driver,/-driver-channel) 0.2.0 2023-10-16 20:59:06 +02:00
Dario Nieuwenhuis
213b4c9dca time: add links key, release v0.1.5. 2023-10-16 20:11:35 +02:00
Dario Nieuwenhuis
18e96898ea stm32/rcc: unify L4 and L5. 2023-10-16 04:00:51 +02:00
Dario Nieuwenhuis
5c5e681819 stm32/rcc: add better support for L4/L4+ differences. 2023-10-16 03:23:43 +02:00
xoviat
4a156df7a1 stm32: expand rcc mux to g4 and h7 2023-10-14 23:33:57 -05:00
Dario Nieuwenhuis
8a10948ce9 stm32/rcc: port L4 to the "flattened" API like h5/h7. 2023-10-15 03:08:49 +02:00
Adam Greig
0621e957a0
time: Update examples, tests, and other code to use new Timer::after_x convenience methods 2023-10-15 01:30:12 +01:00
Dario Nieuwenhuis
2e50bf667a
Merge pull request #2055 from kalkyl/usb-midi
embassy-usb: Add MIDI class
2023-10-14 23:10:25 +00:00
kalkyl
a57d383b1d embassy-usb: Add MIDI class 2023-10-14 04:20:59 +02:00
Dániel Buga
02d2c06b23 Release embassy-time 0.1.4 2023-10-12 18:14:33 +02:00
Dario Nieuwenhuis
66e399b5c6
Merge pull request #2035 from pbert519/stm_reset_and_enable
STM32: combine RccPeripherals reset() and enable() to enable_and_reset()
2023-10-12 14:09:13 +00:00
Ulf Lilleengen
01eb1a7339
Merge pull request #2033 from andresovela/stm32-add-timeout-to-i2c
stm32: add timeout to I2C driver
2023-10-12 10:44:27 +00:00
pbert
ecdd7c0e2f enable clock first 2023-10-12 11:04:44 +02:00
pbert
f65a96c541 STM32: combine RccPeripherals reset() and enable() to reset_and_enable() 2023-10-12 11:04:19 +02:00
Dario Nieuwenhuis
32b89eeba1 net: remove atomic-polyfill. 2023-10-12 02:07:26 +02:00
Andres Oliva
4cec4b0548 Remove more unused stuff 2023-10-11 23:52:26 +02:00
Dario Nieuwenhuis
b91d1eaca0 stm32/rcc: add LSE/LSI to all chips, add RTC to more chips. 2023-10-11 04:12:38 +02:00
Dario Nieuwenhuis
d0d0ceec6a stm32/rcc: rename HSE32 to HSE 2023-10-11 01:06:44 +02:00
Dario Nieuwenhuis
0cfa8d1bb5 stm32/rcc: use more PLL etc enums from PAC. 2023-10-11 00:12:33 +02:00
Andres Oliva
cd12c9cbce stm32: add timeout to I2C driver 2023-10-10 18:20:46 +02:00
Gabriel Górski
e62bf6a9fd Patch tests & examples 2023-10-09 13:46:56 +02:00
Dario Nieuwenhuis
6186fe0807 stm32/rcc: use PLL enums from PAC. 2023-10-09 02:48:22 +02:00
Dario Nieuwenhuis
85c6f23dcb
Merge pull request #2018 from jamesmunns/add-derives
Add some uncontroversial derives to Error types
2023-10-07 00:03:10 +00:00
Dario Nieuwenhuis
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
Dario Nieuwenhuis
3a8e0d4a27 stm32: implement MCO for all chips. 2023-10-07 01:15:24 +02:00
Matt Ickstadt
f01609036f h7: implement RTC and LSE clock configuration 2023-10-06 13:28:30 -05:00
James Munns
930b8f3495 Add some uncontroversial derives to Error types 2023-10-06 17:45:35 +02:00
Will Glynn
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
xoviat
e1a0635ca3 stm32: update metapac and fix opamp ch 2023-10-04 16:15:08 -05:00
Dario Nieuwenhuis
0324cee0ca update embedded-io, embedded-nal-async. 2023-10-04 00:10:55 +02:00
xoviat
e561e673c2 stm32: add opamp mod and update pac 2023-10-03 16:34:13 -05:00
KingCol13
90ade1b311 Add wait for DHCP in rp wifi_tcp_server 2023-10-02 20:10:52 +01:00
KingCol13
a931dfd9ad Update firmware size in rp wifi examples 2023-10-02 20:10:45 +01:00