14145 Commits

Author SHA1 Message Date
Dion Dokter
777d0d1e22 Merge pull request #5803 from Lightyear-Layer/refcount-enum
stm32: use exhaustive enum for refcounts
2026-04-06 18:15:53 +00:00
Wojciech Graj
2bbf2f9df1 stm32: use exhaustive enum for refcounts
This greatly simplifies the refcount-related code. Since
sizeof(Option<#[repr(u8)] enum>) == sizeof(u8), the code is
equivalent, but the compiler can optimize out bounds checks.
2026-04-06 19:47:03 +02:00
xoviat
38d7cd8f0b Merge pull request #5801 from xoviat/adc
stm32/adc: extract v1
2026-04-06 16:53:29 +00:00
xoviat
4c22a99cef stm32/adc: cleanup and extract v1 2026-04-06 11:42:03 -05:00
Felipe Balbi
fd13383dc0 Merge pull request #5811 from felipebalbi/mcxa/atomic-waker
[MCXA] dma: switch to WaitCell
2026-04-06 15:43:51 +00:00
Felipe Balbi
3bc003d522 [MCXA] dma: switch to WaitCell
Fixes https://github.com/OpenDevicePartnership/embassy-mcxa/issues/133
2026-04-06 08:37:32 -07:00
xoviat
b58369b914 Merge pull request #5810 from xoviat/adc2
stm32: further adc cleanup
2026-04-06 14:10:37 +00:00
xoviat
2b5a59d35d stm32/adc: more cleanup 2026-04-06 09:05:39 -05:00
xoviat
10dab9e226 Merge pull request #5807 from xoviat/wake-guard
stm32: replace without_stop with wakeguard
2026-04-06 00:00:54 +00:00
xoviat
5a1cc3eafb stm32: replace without_stop with wakeguard 2026-04-05 18:57:54 -05:00
xoviat
376595019a Merge pull request #5806 from robamu/add-pipe-try-write-all-method
add `try_write_all` method to Pipe
2026-04-05 23:23:26 +00:00
Robin Mueller
e20555ee96 add try_write_all method to Pipe 2026-04-06 00:22:21 +02:00
xoviat
1567c04b3e Merge pull request #5802 from xoviat/adc-cleanup
stm32/adc: impl. cleanup
2026-04-05 22:05:17 +00:00
xoviat
8b6138737a ci: update docserver 2026-04-05 17:02:48 -05:00
xoviat
9900d9f0ab stm32/adc: impl. cleanup 2026-04-05 17:01:53 -05:00
xoviat
2486158de1 Merge pull request #5800 from boondocklabs/stm32-dualcore
STM32 HSEM improvements, use HSEM for dual core init sync
2026-04-05 01:32:43 +00:00
Matt Thompson
9173183c8d get_hsem() feature gate 2026-04-04 18:24:49 -07:00
Matt Thompson
f304974132 Merge branch 'stm32-dualcore' of https://github.com/boondocklabs/embassy into stm32-dualcore 2026-04-04 18:10:56 -07:00
Matt Thompson
7f3025d7eb HSEM - Assert on max channels, not pub channels. Use get_hsem() in init 2026-04-04 18:10:52 -07:00
Matt Thompson
dc5adf13e7 use rcc for stm32w gate 2026-04-04 15:34:28 -07:00
Matt Thompson
9ad475f0a7 STM32 HSEM improvements, dual core HSEM init sync 2026-04-04 15:29:43 -07:00
xoviat
7acf7cbc5f Merge pull request #5799 from xoviat/adc
stm32/adc: extract injected fn
2026-04-04 20:45:32 +00:00
xoviat
f3759e38e6 stm32/adc: extract injected fn 2026-04-04 15:39:16 -05:00
xoviat
49ab7a4a80 Merge pull request #5798 from fuchskurt/main
embassy-stm32/adc: add ConfiguredSequence for repeated DMA reads
2026-04-04 20:03:30 +00:00
xoviat
b68110a6c8 Merge pull request #5795 from boondocklabs/stm32-exti-dualcore
STM32 EXTI H7 dual core
2026-04-04 19:58:39 +00:00
Kurt Fuchs
792927dc25 embassy-stm32/adc: add ConfiguredSequence for repeated DMA reads
Programs the ADC channel sequence registers once at construction and
reuses them across repeated reads, avoiding the per-call overhead of
reprogramming the sequence registers. Available to all ADC variants that
support DMA reads via a new ConversionMode::ConfiguredSequence variant.

Each variant uses DMACFG=CIRCULAR (or equivalent) with cont=false so DMA
stays armed between calls while the ADC runs only one sequence per start().
On adc_v2, DDS=CONTINUOUS + cont=false is used for the same effect.

Changes:
- embassy-stm32/src/adc/mod.rs: add ConversionMode::ConfiguredSequence,
  Adc::configured_sequence method
- embassy-stm32/src/adc/configured_sequence.rs: new file
- embassy-stm32/src/adc/v2.rs: add ConfiguredSequence arm
- embassy-stm32/src/adc/v3.rs: add ConfiguredSequence arm
- embassy-stm32/src/adc/g4.rs: add ConfiguredSequence arm
- embassy-stm32/src/adc/v4.rs: add ConfiguredSequence arm
- embassy-stm32/src/adc/c0.rs: add ConfiguredSequence arm
- embassy-stm32/src/adc/adc4.rs: add ConfiguredSequence arm

Co-authored-by: tommasoclini <tommasoclini@users.noreply.github.com>
2026-04-04 21:56:14 +02:00
Kurt Fuchs
54492fcdae embassy-stm32/adc: add ConfiguredSequence for repeated DMA reads
Programs the ADC channel sequence registers once at construction and
reuses them across repeated reads, avoiding the per-call overhead of
reprogramming the sequence registers. Available to all ADC variants that
support DMA reads via a new ConversionMode::ConfiguredSequence variant.

Each variant uses DMACFG=CIRCULAR (or equivalent) with cont=false so DMA
stays armed between calls while the ADC runs only one sequence per start().
On adc_v2, DDS=CONTINUOUS + cont=false is used for the same effect.

Changes:
- embassy-stm32/src/adc/mod.rs: add ConversionMode::ConfiguredSequence,
  Adc::configured_sequence method
- embassy-stm32/src/adc/configured_sequence.rs: new file
- embassy-stm32/src/adc/v2.rs: add ConfiguredSequence arm
- embassy-stm32/src/adc/v3.rs: add ConfiguredSequence arm
- embassy-stm32/src/adc/g4.rs: add ConfiguredSequence arm
- embassy-stm32/src/adc/v4.rs: add ConfiguredSequence arm
- embassy-stm32/src/adc/c0.rs: add ConfiguredSequence arm
- embassy-stm32/src/adc/adc4.rs: add ConfiguredSequence arm

Co-authored-by: tommasoclini <tommasoclini@users.noreply.github.com>
2026-04-04 21:34:53 +02:00
Matt Thompson
e1dd793ee6 Update metapac version. Fix gating 2026-04-04 12:33:04 -07:00
Matt Thompson
230e9628f3 STM32 EXTI H7 dual core 2026-04-04 01:22:34 -07:00
xoviat
e098a4519a Merge pull request #5794 from xoviat/adc
stm32/adc: rework trigger traits again
2026-04-04 03:59:02 +00:00
xoviat
ea00c0194b stm32/adc: rework trigger traits again 2026-04-03 22:57:13 -05:00
xoviat
e7eef880a0 Merge pull request #5762 from xoviat/cordic
stm32: update cordic mod
2026-04-04 01:51:27 +00:00
xoviat
16c1c16cff stm32: update cordic mod 2026-04-03 20:30:56 -05:00
xoviat
aa51fdb6b0 Merge pull request #5793 from rockboynton/input-capture-split
input_capture: add per-channel split API
2026-04-04 01:29:01 +00:00
Rock Boynton
fc428a0ae7 input_capture: add changelog entry for split API 2026-04-03 18:25:26 -07:00
Rock Boynton
791bb8bdfe input_capture: add split example with two concurrent channels 2026-04-03 18:25:26 -07:00
Rock Boynton
e2ec97cf8b input_capture: add per-channel split API
Add InputCaptureChannel and InputCaptureChannels types with a split()
method, mirroring the existing SimplePwm/OnePulse pattern. This enables
concurrent async capture on multiple channels of the same timer.
2026-04-03 18:11:25 -07:00
xoviat
a4ec0e99ed Merge pull request #5792 from xoviat/doc
stm32/doc: fix macro desc
2026-04-03 23:28:00 +00:00
xoviat
a319fae167 stm32/doc: fix macro desc 2026-04-03 18:22:16 -05:00
Felipe Balbi
ee96fac905 Merge pull request #5790 from felipebalbi/mcxa/trng
[MCXA] trng: re-add registers previously removed
2026-04-03 20:25:01 +00:00
Felipe Balbi
539313e653 [MCXA] trng: re-add registers previously removed
While at that, also update the default configuration to match what the
NXP SDK is doing after the latest update and simplify the constructors.
2026-04-03 13:20:06 -07:00
xoviat
68743b7005 Merge pull request #5791 from fuchskurt/refactor_configure_sequence
embassy-stm32/adc/v2: fix configure_sequence
2026-04-03 20:11:43 +00:00
Kurt Fuchs
70a8d9f50d embassy-stm32/adc/v2: fix configure_sequence
- Fix configure_sequence to correctly distribute channels across
SQR1/SQR2/SQR3 instead of writing all ranks to SQR3
2026-04-03 21:54:05 +02:00
xoviat
c37d1740b6 Merge pull request #5788 from xoviat/adc
stm32/adc: rework mod
2026-04-03 19:11:22 +00:00
xoviat
9188517082 stm32: rework adc api and add read_v2 2026-04-03 14:09:08 -05:00
Dario Nieuwenhuis
4469a15785 Merge pull request #5527 from Humminghead/usb-hid-ifnterface-num
USB: Interface number was added in HID reader/writer
2026-04-03 18:19:08 +00:00
xoviat
4406ee5518 Merge pull request #5786 from xoviat/ci
ci: update docserver
2026-04-03 13:00:59 +00:00
xoviat
f41d18bd83 ci: update docserver 2026-04-03 07:57:19 -05:00
xoviat
91ccd0c03a Merge pull request #5785 from xoviat/ci
ci: update docserver
2026-04-03 00:21:48 +00:00
xoviat
000fca5eac ci: update docserver 2026-04-02 19:18:29 -05:00