Corey Schuhen
535e4c20e8
Remove unused methods including incorrect #[must_use...
2024-03-14 08:21:45 +10:00
Corey Schuhen
242759a600
Use Result instead of Option for Frame creation.
2024-03-13 17:46:50 +10:00
Corey Schuhen
12a3af5043
Shared frame types.
...
Remove BXCAN speciffic id and frame modules
Remove SizedClassicData
2024-03-13 17:46:50 +10:00
Dario Nieuwenhuis
35f284ec22
Merge pull request #2691 from caleb-garrett/cryp-dma
...
STM32 CRYP DMA
2024-03-12 19:30:20 +00:00
Dario Nieuwenhuis
9101b9eb01
Merge pull request #2650 from cschuhen/feature/bxcan_pac
...
Use stm32-metapac for BXCAN.
2024-03-12 19:05:22 +00:00
Caleb Garrett
2634a57098
Correct cryp CI build issues.
2024-03-12 15:05:22 -04:00
Caleb Garrett
1ec9fc58f4
Add async CRYP to test.
2024-03-12 14:52:34 -04:00
Caleb Garrett
61050a16d5
Add CRYP DMA support. Updated example.
2024-03-12 12:01:14 -04:00
Timo Kröger
30cdc6c9c5
[UCPD] Disable dead-battery resistor for all families
...
Using the code from PR #2683 , thank you @ExplodingWaffle
Removes the dead-battery as selectable option because its unclear if
it can be re-enabled. Also there is no use case for it because the same
resistor can be configured with the sink option.
2024-03-12 08:49:27 +01:00
Timo Kröger
eeb033caf0
[UCPD] Disable RCC clock on drop
2024-03-12 08:14:42 +01:00
Timo Kröger
89504f5162
[UCPD] Split into CC and PD phy
...
PD3.0 spec requires concurrent control of CC resistors for collision avoidance.
Needed to introduce some "ref counting" (its just a bool) for drop code.
2024-03-12 08:14:42 +01:00
Timo Kröger
99854ff840
[UCPD] Fix build for devices with GPDMA
...
Do not use a flag that is DMA/BDMA only, not required anyway
the transfer should run in the background nevertheless
2024-03-12 08:14:42 +01:00
Timo Kröger
ff8129a6a6
[UCPD] Implement hard reset transmission
2024-03-12 08:14:42 +01:00
Timo Kröger
c1efcbba2d
[UCPD] Receive hard resets
2024-03-12 08:14:42 +01:00
Timo Kröger
b7972048a1
[UCPD] Improve example and defmt Format for enums
2024-03-12 08:14:42 +01:00
Timo Kröger
5e271ff31b
[UCPD] Combine RX and TX
...
`select(rx.receive(), tx.transmit()` had subtle interrupt enable race conditions.
Combine receiver and transmitter into one new `PdPhy` struct to disallow the
problematic pattern.
Scanning through the USB PD 2.0 specification there is no need to have RX and TX
running concurrently (after all the USB PD communication is half-duplex).
2024-03-12 08:14:42 +01:00
Timo Kröger
36a9918921
[UCPD] Implement PD transmitter
2024-03-12 08:14:42 +01:00
Timo Kröger
984d5bbc72
[UCPD] Implement PD receiver
2024-03-12 08:14:42 +01:00
Timo Kröger
4d0e383816
[UCPD] Prepare for PD communication implementation
2024-03-12 08:14:42 +01:00
Timo Kröger
a3b1222617
[UCPD] Improve Type-C CC handling
...
* Improved interrupt handling: Clear flags in ISR, check state change in future
* Disable pull-up/pull-down resistors and voltage monitor on drop
* nightly rustfmt
2024-03-12 08:14:42 +01:00
Timo Kröger
d99fcfd0c2
[UCPD] Configuration Channel (CC) handling
2024-03-12 08:14:42 +01:00
Timo Kröger
aa1411e2c7
[UCPD] Prepare interrupt handle
2024-03-12 08:14:41 +01:00
Timo Kröger
8a255b375b
[UCPD] Instance and Pin Traits
...
Skip FRSTX pin for now. Its available twice in the device JSON as
FRSTX1 and FRSTX2 both with the same pins as targets.
I don’t know enough about the FRS (fast role switch) feature to
understand if that is correct and how to handle the pins.
2024-03-12 08:14:41 +01:00
Dario Nieuwenhuis
1ef02e5384
Merge pull request #2683 from ExplodingWaffle/ucpd-dbdis
...
stm32: add disable_ucpdx_dead_battery
2024-03-11 23:36:15 +00:00
Harry Brooke
d4869b83fc
disable -> enable. also extracted to function for easy refactoring later
2024-03-11 23:03:09 +00:00
Dominic
b6a383811a
Improve panic message when requesting frequency higher than clock
...
Previously it would panic with message "unreachable", which isn't
particularly clear about what the problem is and how to fix it.
2024-03-11 17:52:18 +01:00
Caleb Garrett
6e9e8eeb5f
Refactored cryp din/dout into functions.
2024-03-11 11:08:02 -04:00
Harry Brooke
096d147dce
stm32: add disable_ucpdx_dead_battery
2024-03-11 11:42:04 +00:00
Harry Brooke
f761f721bc
fix ci
2024-03-10 22:51:42 +00:00
Caleb Garrett
4a5b6e05fb
Correct more CI build issues.
2024-03-10 17:33:40 -04:00
Caleb Garrett
50a7ada0bb
Fixed DMA CI build issues.
2024-03-10 17:28:53 -04:00
Caleb Garrett
e92094986d
Add DMA request priority as transfer option.
2024-03-10 16:53:37 -04:00
Adam Greig
b456addb2b
stm32: bump metapac version
2024-03-09 20:13:20 +00:00
Harry Brooke
2d7ec281e8
stm32/rcc: wait for peripheral clock to be active. also, hold the peripheral reset while enabling the clock.
2024-03-09 18:24:31 +00:00
Dominic
71179fa818
Check for CPU_FREQ_BOOST
2024-03-09 11:55:09 +01:00
Dominic
fadffc5061
Fix incorrect D1CPRE max for STM32H7 RM0468
2024-03-09 11:55:09 +01:00
Ralf
b7bb4b23f8
STM32 SimplePwm: Fix regression and re-enable output pin
...
PR #2499 implemented timer hierarchy, but removed enable_outputs()
from trait CaptureCompare16bitInstance and from SimplePwm.
This functions is required for advanced timers to set bit BDTR.MOE
and to enable the output signal.
2024-03-08 11:18:45 +01:00
Karun
fda6e3fb8c
Resolve rustfmt issue and unused import errors
2024-03-07 15:23:45 -05:00
Karun Koppula
54751b7a50
Merge branch 'main' into karun/main_octospi_implementation
2024-03-07 15:20:29 -05:00
Karun
3b1d87050e
Update trait definitions
...
Make operations generic against valid data widths
2024-03-07 14:41:27 -05:00
Karun
e163572bec
Add get and set config trait implementations
2024-03-07 14:41:26 -05:00
Karun
b86a1f0700
Add constructors
...
Add transfer configuration
Update command configuration
Add peripheral width consideration
Add drop impl
2024-03-07 14:41:04 -05:00
Karun
a0b7067205
Add user enums for transaction configuration
2024-03-07 14:30:53 -05:00
Karun
9ed8d01b11
Add transfer config, trait, functional initial configuration and read from memory
2024-03-07 14:30:53 -05:00
Karun
f3609f2842
Add initial octopsi module
2024-03-07 14:30:53 -05:00
Karun
9905bbe9f7
Update peripheral crate to updated octospi pac
2024-03-07 14:30:53 -05:00
Karun
2ab1b2ac9a
Update stm-32 build script to include ospi traits
2024-03-07 14:29:37 -05:00
Dario Nieuwenhuis
b2d236ee39
Merge pull request #2667 from timokroeger/stm32-anychannel-fix
...
stm32: Implement `Channel` trait for `AnyChannel`
2024-03-07 15:18:32 +00:00
Tomas Barton
bb3711bbf9
update stm32c0 HSI frequency
2024-03-07 06:51:32 -08:00
Timo Kröger
bbc06458a3
stm32: Implement Channel
trait for AnyChannel
2024-03-07 15:05:28 +01:00
Corey Schuhen
84d21e959d
Dummy
2024-03-07 17:45:01 +10:00
Corey Schuhen
98e7a0a423
Remove old PAC from bscan crate.
2024-03-07 17:45:01 +10:00
Corey Schuhen
9ba379fb9e
Remove usage of old PAC
...
Formatting
2024-03-07 17:45:01 +10:00
Corey Schuhen
65b38cf755
Fix examples and improve imports required.
2024-03-07 17:45:01 +10:00
Corey Schuhen
a9ff38003b
Documentation.
...
.
2024-03-07 17:45:01 +10:00
Corey Schuhen
455cc40261
Port registers access to using Embassy PAC
...
Use stm32-metapac for filters module.
2024-03-07 17:45:01 +10:00
Corey Schuhen
b0f05e7682
Remove unused.
2024-03-07 17:45:01 +10:00
Corey Schuhen
34687a0956
Apply cargo fmt
...
Formatting.
2024-03-07 17:45:01 +10:00
Corey Schuhen
fecb65b988
Make use of internal BXCAN crate work. Tested on stm32f103 with real bus and HIL tests.
...
Fix
2024-03-07 17:45:01 +10:00
Corey Schuhen
f736f1b27f
RAW copy of files from BXCAN crate. No changes whatsoever.
2024-03-07 17:45:01 +10:00
Torin Cooper-Bennun
e0018c6f4f
stm32: can:fd: merge read impls; buffered RX returns Result<_, BusError>
2024-03-04 12:38:46 +00:00
Torin Cooper-Bennun
72c6cdc5d5
stm32: can: fd: rename TxBufferMode::Queue -> ::Priority for clarity
2024-03-04 12:22:18 +00:00
Dario Nieuwenhuis
ae266f3bf5
stm32/rcc: port c0 to new api. Add c0 HSIKER/HSISYS support.
2024-03-04 00:08:14 +01:00
Dario Nieuwenhuis
c8c4b0b701
stm32/rcc: port g0 to new api.
2024-03-04 00:04:06 +01:00
Dario Nieuwenhuis
b4567bb8c5
stm32/rcc: g4: consistent PllSource, add pll pqr limits, simplify a bit.
2024-03-04 00:04:06 +01:00
Corey Schuhen
b693ab9b34
Restore init order to restore H7.
...
Previous commit broke H7 support in HIL farm. Restore previous order by moving a bunch of config from new and into_config_mode to apply_config.
This is a cleanup that I had considered to move more register access into peripheral.rs.
2024-03-02 14:18:12 +10:00
Corey Schuhen
bf06d10534
Delay setting TX buffer mode until user had a chance to configure it.
2024-03-02 14:00:56 +10:00
Torin Cooper-Bennun
9e403fa89a
stm32: can: fd: rename abort_pending_mailbox, rm pub qualifier
2024-03-02 10:08:20 +10:00
Torin Cooper-Bennun
befbb2845a
stm32: can: fd: write: if in TX FIFO mode & bufs full, then abort
2024-03-02 10:08:20 +10:00
Torin Cooper-Bennun
30606f9782
stm32: can: fd: allow TX buffers in FIFO mode
2024-03-02 10:08:20 +10:00
Dario Nieuwenhuis
3fe907b54d
Merge pull request #2646 from cschuhen/feature/wake_tx_on_buffered_push
...
Give CAN a kick when writing into TX buffer via sender.
2024-03-01 23:15:42 +00:00
Corey Schuhen
df8f508ffa
Writing to TX buffer also needs to fire an interrupt to kick off transmission if it is idle.
...
Formatting
2024-03-02 09:09:27 +10:00
Dario Nieuwenhuis
95234cddba
stm32: autogenerate mux config for all chips.
2024-03-01 23:54:37 +01:00
Dario Nieuwenhuis
d5c9c611fa
Merge pull request #2619 from caleb-garrett/cryp
...
STM32 Crypto Accelerator
2024-03-01 19:35:57 +00:00
Siebe Claes
96af20cf5b
stm32: can: fd: Fix Frame is_extended() function
2024-03-01 19:21:01 +01:00
Caleb Garrett
c9cca3c007
Fix H7 CRYP operation.
2024-02-29 19:09:44 -05:00
Caleb Garrett
998532c33e
Merge branch 'embassy-rs:main' into cryp
2024-02-29 15:21:06 -05:00
Dario Nieuwenhuis
263d1b024c
Merge pull request #2637 from cschuhen/feature/fix_buf_size
...
Buffer is not big enough for FD frames.
2024-02-28 17:33:58 +00:00
eZio Pan
47c579eba2
update metapac
2024-02-29 00:11:40 +08:00
Corey Schuhen
1353a343b8
Buffer is not big enough for FD frames.
2024-02-28 18:03:53 +10:00
Dario Nieuwenhuis
5ced938184
Merge pull request #2634 from maiaherringfish/stm32h7-fdcansel-fix
...
adding FDCANSEL logic for STM32H7x
2024-02-28 00:54:43 +00:00
Torin Cooper-Bennun
a8da42943f
stm32: can: fd: rm some irrelevant commented code and dead code
2024-02-27 23:47:41 +00:00
Torin Cooper-Bennun
0ed402fd79
stm32: can: fd: refactor out some duplicate code
2024-02-27 23:47:25 +00:00
Maia
b7e0964a07
added FDCANSEL logic for H7
2024-02-27 11:07:05 -08:00
Dario Nieuwenhuis
62c5df7e5b
Merge pull request #2631 from MaxiluxSystems/small-fdcan-fixes
...
stm32: can: fd: fix SID read/write and BRS setting for TX
2024-02-27 12:19:03 +00:00
Torin Cooper-Bennun
9a4f58fe15
stm32: can: fd: only TX with BRS if also TXing with FDF
2024-02-27 10:38:40 +00:00
Torin Cooper-Bennun
e63b0d7a2f
stm32: can: fd: fix SID read/write from buf elems
2024-02-27 10:38:07 +00:00
eZio Pan
bf44adc4bc
allow higher psc value for iwdg_v3
2024-02-27 14:20:58 +08:00
Dario Nieuwenhuis
d5a2b3be58
Merge pull request #2614 from MaxiluxSystems/time_driver_tim1
...
stm32: time_driver: allow use of TIM1 for driver
2024-02-26 12:08:32 +00:00
Torin Cooper-Bennun
5c45723777
stm32: timers: use TIMx_CC interrupt source for advanced timers
...
fixes (hopefully) time driver when using TIM1/8/20
2024-02-26 10:03:51 +00:00
Caleb Garrett
29d0d80808
Merge branch 'main' into cryp
2024-02-25 21:21:21 -05:00
Dario Nieuwenhuis
c83ab20526
stm32: update metapac.
2024-02-26 03:02:58 +01:00
Dario Nieuwenhuis
72c6f9a101
stm32/adc: reexport enums from PAC to avoid boilerplate hell.
2024-02-26 03:02:58 +01:00
Caleb Garrett
d9c0da8102
Update metapac to address CI build issue.
2024-02-25 20:59:07 -05:00
Caleb Garrett
236fc6f650
Add CRYP test.
2024-02-25 20:59:07 -05:00
Caleb Garrett
f352b6d68b
Address CI build issues.
2024-02-25 20:59:07 -05:00
Caleb Garrett
25ec838af5
Correct AAD ingest.
2024-02-25 20:59:07 -05:00
Caleb Garrett
967b4927b0
Correct tag generation.
2024-02-25 20:59:07 -05:00
Caleb Garrett
cbca3a5c9f
Support v1 and v2 cryp variants.
2024-02-25 20:59:07 -05:00
Caleb Garrett
29d8b45956
Add DES and TDES support. Support variable tag sizes.
2024-02-25 20:59:07 -05:00
Caleb Garrett
14c2c28e06
Corrected additional associated data operation.
2024-02-25 20:59:07 -05:00
Caleb Garrett
f64a62149e
Corrected CCM partial block ops.
2024-02-25 20:59:07 -05:00
Caleb Garrett
1e21b758f7
Corrected GCM tag generation.
2024-02-25 20:59:07 -05:00
Caleb Garrett
690b2118c6
CCM mode functional.
2024-02-25 20:59:07 -05:00
Caleb Garrett
fec26e8960
Refactored ciphers into traits.
2024-02-25 20:59:07 -05:00
Caleb Garrett
c2b03eff62
GCM mode functional.
2024-02-25 20:59:07 -05:00
Caleb Garrett
565acdf243
CTR mode functional.
2024-02-25 20:59:07 -05:00
Caleb Garrett
72e4cacd91
CBC and ECB AES modes functional.
2024-02-25 20:59:07 -05:00
Caleb Garrett
a0a8a4ec86
Support CBC, ECB, CTR modes.
2024-02-25 20:59:07 -05:00
Caleb Garrett
79e5e8b052
Add cryp configuration.
2024-02-25 20:59:07 -05:00
Dario Nieuwenhuis
a308b9ac2f
Merge branch 'adc_h5' into add-pll1_p_mul_2-clock
2024-02-26 02:14:38 +01:00
Eli Orona
abde7891e3
Update metapac version
2024-02-25 16:44:46 -08:00
Eli Orona
2dfd66b7c4
🤦
2024-02-25 16:25:42 -08:00
Eli Orona
7dbae799dc
Rust FMT
2024-02-25 16:24:52 -08:00
Eli Orona
c23b59bdc8
Add pll1_p_mul_2
clock.
2024-02-25 16:12:32 -08:00
Dario Nieuwenhuis
489d0be2a2
stm32/rcc: unify naming sysclk field to sys
, enum to Sysclk
.
2024-02-26 00:00:17 +01:00
Dario Nieuwenhuis
497515ed57
Merge pull request #2583 from OroArmor/tim_pll_clk
...
Enable PLL Clocks for TIMx peripherals on STM32F3xx Chips
2024-02-25 22:45:48 +00:00
Corey Schuhen
a737a7350e
FDCAN: Remove history from comments.
2024-02-25 10:14:12 +10:00
Corey Schuhen
1327a644b6
FDCAN: Don't require internal module for public API.
2024-02-25 10:14:12 +10:00
Corey Schuhen
0565098b06
FDCAN: Fix some indenting in macros
2024-02-25 10:14:12 +10:00
Corey Schuhen
a061cf3133
FDCAN: Allow access to buffered senders and receivers.
2024-02-25 10:14:12 +10:00
Corey Schuhen
779898c0e7
FDCAN: Expose some pub types in API
2024-02-25 10:14:12 +10:00
Corey Schuhen
2d634d07e0
FDCAN: Remove extra traits from.
...
Comments
Fix.
2024-02-25 10:13:58 +10:00
Eli Orona
394abda092
Fix report with the same name
2024-02-24 12:58:38 -08:00
Eli Orona
e79d2dd756
Move to internal mod and re-export the enums
2024-02-24 12:54:58 -08:00
Dario Nieuwenhuis
e67dfcb04f
stm32/dma: add AnyChannel, add support for BDMA on H7.
2024-02-24 02:41:41 +01:00
Torin Cooper-Bennun
86ccf0bc3e
stm32: remove TIM11 as time driver candidate (only 1 CC channel)
2024-02-23 14:35:12 +00:00
Torin Cooper-Bennun
44534abf32
stm32: sync available TIMs in Cargo.toml, build.rs
2024-02-23 14:35:12 +00:00
Torin Cooper-Bennun
a11e3146f8
stm32: time_driver: allow use of TIM1 for driver
2024-02-23 14:35:12 +00:00
Dario Nieuwenhuis
f77d59500e
Merge pull request #2618 from barnabywalters/g4rcc
...
[embassy-stm32] G4 RCC refactor amendments and additions
2024-02-23 13:05:01 +00:00
Barnaby Walters
b091ffcb55
[embassy-stm32] G4 RCC refactor amendments and additions
...
* Added assertions for a variety of clock frequencies, based on the reference manual and
stm32g474 datasheet. The family and numbers are consistent enough that I’m assuming
these numbers will work for the other chips.
* Corrected value of pll1_q in set_clocks call, added pll1_r value
2024-02-23 01:59:24 +01:00
Dario Nieuwenhuis
a6a5d9913c
Merge branch 'main' into stm32l0-reset-rtc
2024-02-23 01:45:10 +01:00
Dario Nieuwenhuis
0665e0d452
stm32/rcc: port U5 to new API, add all PLLs, all HSE modes.
2024-02-23 01:24:05 +01:00
Dario Nieuwenhuis
4481c5f3cc
Merge pull request #2616 from embassy-rs/h5-stupid-errata
...
stm32/rcc: workaround nonsense RAM suicide errata on backup domain reset.
2024-02-23 00:25:30 +01:00
Dario Nieuwenhuis
475dea0208
stm32/rcc: workaround nonsense RAM suicide errata on backup domain reset.
2024-02-23 00:18:24 +01:00
Dario Nieuwenhuis
9c918f6474
Merge pull request #2588 from cschuhen/feature/fdcan_buffered
...
Add FDCAN Buffered mode.
2024-02-23 00:07:05 +01:00
Torin Cooper-Bennun
5d2ccc8fa7
adc: basic H5 support
2024-02-22 15:50:13 +00:00
Eli Orona
88e29608ed
Rust fmt
2024-02-20 17:59:51 -08:00
Eli Orona
2ee9b37373
Move to a single Mux Struct.
2024-02-20 17:54:35 -08:00
Joonas Javanainen
9b2d096f4f
USB needs PWR_CR2 USV set on STM32L4
...
Confirmed to be needed on an STM32L422, and based on a quick look at
L4/L4+ reference manuals, this bit is present and required to be set on
all L4 chips that have some kind of USB peripheral (USB or OTG_FS).
The `usb_otg` driver already sets it for `cfg(stm32l4)` and we should do
the same thing here.
2024-02-20 21:47:13 +02:00
Dario Nieuwenhuis
55187c7276
Merge pull request #2602 from embassy-rs/peripheralref-no-derefmut
...
hal-internal: remove impl DerefMut for PeripheralRef.
2024-02-20 13:51:01 +00:00
Dario Nieuwenhuis
e8474426d8
hal-internal: remove impl DerefMut for PeripheralRef.
...
if you have `PeripheralRef<'a, AnyPIn>` for pin A, and `AnyPin` (owned) for pin B, you can `mem::swap` them.
so, getting access forever to pin A, just by "sacrificing" pin B
this defeats the point of PeripheralRef, which is if you got a `PeripheralRef<'a, T>` then you're only allowed to use the peripheral for `'a`.
Also some drivers rely on the fact only one instance of a singleton exists for soundness, so this is a soundness fix for those.
2024-02-20 01:02:15 +01:00
Torin Cooper-Bennun
67230dc444
flash: h50: first pass at implementation
2024-02-19 16:05:50 +00:00
fe1es
5b7e2d8826
stm32/rcc: reset RTC on stm32l0
2024-02-19 15:25:24 +09:00
Corey Schuhen
eafa90cd07
Remove the OperatingMode typestates
...
Instead have two explcit types(without the mode generic arg)types:
- One for config
- One for all operating modes
2024-02-18 13:09:37 +10:00
Zach
dd9f0d9d9e
support u5 flash
2024-02-17 12:04:53 -06:00
Corey Schuhen
5ad291b708
Add a buffered mode.
2024-02-17 18:26:57 +10:00
Corey Schuhen
91c75c92a0
Clean up and prep for buffered IRQ mode.
...
- Reduce code duplicaiton in read/write methods
- General clean-up
- Prepare for buffered mode
2024-02-17 18:26:57 +10:00
Corey Schuhen
5d8c54fdea
Move error conversion to peripheral.rs
2024-02-17 18:25:58 +10:00
Corey Schuhen
200ace566f
Don't use word Standard for frame format because it can be confused with ID format. Use Classic instead to mean CAN 2.0B frames.
2024-02-17 18:25:58 +10:00
Corey Schuhen
70b3c4374d
Port FDCAN HAL to use PAC directly instead of fdcan crate.
...
- Provide separate FDCAN capable and Classic CAN API's
- Don't use fdcan crate dep anymore
- Provide embedded-can traits.
2024-02-17 18:25:58 +10:00
Eli Orona
e99ef49611
Move to auto-generated based system.
2024-02-16 19:57:00 -08:00
Dario Nieuwenhuis
a3f508e6d1
Merge pull request #2570 from eZioPan/time-driver-singleton
...
Add missing TIM for time-driver; reorder time-driver selection when use "time-drvier-any"
2024-02-17 02:34:45 +00:00
Eli Orona
c99c4a01a9
Update f013.rs
2024-02-16 16:47:38 -08:00
Eli Orona
7592e8be6e
Fix build
2024-02-16 16:45:58 -08:00
Eli Orona
77739faaeb
Rustfmt
2024-02-16 16:42:19 -08:00
Eli Orona
370db9fb06
Update f013.rs
...
Add stm32f398
2024-02-16 16:39:23 -08:00
Dario Nieuwenhuis
9352621058
Merge pull request #2579 from barnabywalters/g4rcc
...
[embassy-stm32]: stm32g4 RCC refactor
2024-02-16 23:38:49 +00:00
Barnaby Walters
6d7458dac7
Refinements
...
* Implemented boost mode dance (RM0440 p234-245, 6.5.1)
* Enabled boost mode in usb_serial example, tested on hardware
* Removed hard requirement of a valid 48MHz source (HSI48 is checked if
requested, PLL passed through as-is and assumed to be valid)
* Used calc_pclk to calculate APB frequencies
* Refactored 48MHz configuration code to remove unnecessary let and block
* Renamed ahb_freq to hclk for clarity and consistency
2024-02-17 00:30:16 +01:00
Barnaby Walters
a24087c36c
Configured SYSCLK after boost mode, added comments
2024-02-16 21:52:58 +01:00
Barnaby Walters
e465dacf73
Added documentation, fixed and refined boost and flash read latency config
2024-02-16 21:34:12 +01:00
Barnaby Walters
25a95503f6
Configured HSI48 if enabled, assert is enabled if chosen as clk48 source
2024-02-16 20:41:04 +01:00
Barnaby Walters
ae74833999
Removed redundant HSI48 configuration
2024-02-16 20:32:35 +01:00
Barnaby Walters
32e4c93954
Removed dangling doc comments
2024-02-16 19:58:19 +01:00
Eli Orona
d7623c7929
Remove extraneous , in cfg
2024-02-15 23:20:35 -08:00
Eli Orona
d28ba1d606
rustfmt
2024-02-15 23:16:17 -08:00
Eli Orona
56b345c722
Clean up register setting
2024-02-15 23:12:18 -08:00
Eli Orona
4408c169a5
Fix cfg lines
2024-02-15 22:55:11 -08:00
Eli Orona
029d6383b5
Rust fmt and fix build.
2024-02-15 20:02:25 -08:00
Eli Orona
169f1ce928
I believe that this enables the PLL clock input to different TIMs for the STM32F3xx Series of chips.
2024-02-15 19:50:42 -08:00
Dario Nieuwenhuis
ae02467434
stm32: update metapac.
2024-02-16 02:07:21 +01:00
Barnaby Walters
396041ad1a
Commented out currently unused constants
2024-02-16 00:04:35 +01:00
Barnaby Walters
5b7eff6541
[embassy-stm32]: started stm32g4 RCC refactor
...
* Copied API from f.rs where applicable
* HSE and HSI independantly configurable
* Boost mode set by user rather
* Added HSE, pll1_q and pll1_p frequencies to set_clocks call
* Stubbed max module based on f.rs, needs cleanup
2024-02-15 23:56:26 +01:00
Dario Nieuwenhuis
5220453d85
Merge pull request #2564 from embassy-rs/rcc-f1-update
...
stm32/rcc: port F1, F0 to new API.
2024-02-14 16:40:11 +00:00
Dario Nieuwenhuis
1860e22693
stm32/rcc: unify f0, f1, f3.
2024-02-14 17:24:20 +01:00
eZio Pan
bbe1eebc53
Add missing TIM for time-driver; reorder time-driver selection when use "time-drvier-any".
2024-02-14 17:43:46 +08:00
Michael de Silva
0ceb313b6f
FIX: Correct typo in stm32 gpio
2024-02-14 07:22:52 +05:30
Caleb Garrett
14a678fe45
Fixed HMAC blocking mode.
2024-02-12 20:33:04 -05:00
Caleb Garrett
d8b4922b3c
Add STM32 HMAC function.
2024-02-12 20:33:04 -05:00
Dario Nieuwenhuis
8c82d1bcbc
Merge pull request #2528 from caleb-garrett/hash
...
STM32 Hash Accelerator
2024-02-13 01:36:11 +01:00
Dario Nieuwenhuis
ccd2c574c3
stm32/rcc: port F0 to new API.
2024-02-13 01:21:51 +01:00
Dario Nieuwenhuis
b7c147445a
stm32/rcc: port F1 to new API.
2024-02-13 01:21:51 +01:00
Dario Nieuwenhuis
739c69bd63
stm32/rcc: some f3 fixes.
2024-02-13 01:15:54 +01:00
Dario Nieuwenhuis
937a9e7955
stm32/rcc: use h7 sdlevel enum from pac.
2024-02-12 20:58:04 +01:00
Dario Nieuwenhuis
0dc5e6d3e4
stm32/rcc: port F3 RCC to new API
...
See #2515
2024-02-12 02:19:31 +01:00
Caleb Garrett
eb64d71247
Consolidated hash drivers.
2024-02-11 11:32:29 -05:00
eZio Pan
b4399a1bf5
timer-doc-fix
2024-02-10 16:22:36 +08:00
Dario Nieuwenhuis
832776d2c7
stm32: update metapac.
2024-02-10 02:50:35 +01:00
Caleb Garrett
0c9661a661
Merge branch 'main' into hash
2024-02-09 19:24:19 -05:00
eZio Pan
8fd803a5fe
use cfg_if to reduce macro condition
2024-02-10 00:00:43 +01:00
eZio Pan
0f94006be3
doc fix
2024-02-10 00:00:43 +01:00
eZio Pan
6c690ab259
restore original public API of timer, but keep new PAC
2024-02-10 00:00:43 +01:00
eZio Pan
b3cdf3a040
bug fix
2024-02-10 00:00:43 +01:00
eZio Pan
319f10da5d
stm32-timer: filter out c0, f1 and f37x
2024-02-10 00:00:43 +01:00
eZio Pan
5b646bc3bd
stm32-timer: L0 is special
2024-02-10 00:00:43 +01:00
eZio Pan
d538829f2f
add methods with macro
2024-02-10 00:00:43 +01:00
Dario Nieuwenhuis
53bf0332e9
asdkf
2024-02-10 00:00:43 +01:00
eZio Pan
dc4898ca89
update timer mod after stm32-metapac timer_v2
2024-02-09 23:58:13 +01:00
eZio Pan
d6636ca116
minor fix
2024-02-09 23:57:09 +01:00
Dario Nieuwenhuis
04147b4147
Merge pull request #2544 from shufps/feat/adc-l0
...
Feat/adc l0
2024-02-09 22:48:57 +00:00