Skip to content

Commit e6f74cc

Browse files
committed
USART1 connects to PCLK1.
1 parent ee27f32 commit e6f74cc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/serial.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,8 +869,17 @@ macro_rules! usart_var_clock {
869869
}
870870

871871
cfg_if::cfg_if! {
872-
if #[cfg(any(feature = "svd-f301", feature = "svd-f3x4"))] {
873-
usart_var_clock!([(1,2)]);
872+
if #[cfg(all(
873+
any(
874+
feature = "mem-4",
875+
feature = "mem-6",
876+
feature = "mem-8",
877+
),
878+
not(feature = "svd-f373")
879+
))] {
880+
// USART1 is accessed through APB2,
881+
// but USART1SW_A::PCLK will connect its phy to PCLK1.
882+
usart_var_clock!([(1,1)]);
874883
// These are uart peripherals, where the only clock source
875884
// is the PCLK (peripheral clock).
876885
usart_static_clock!([(2,1), (3,1)]);

0 commit comments

Comments
 (0)