diff options
Diffstat (limited to 'embassy-stm32/src')
| -rw-r--r-- | embassy-stm32/src/rcc/h.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/embassy-stm32/src/rcc/h.rs b/embassy-stm32/src/rcc/h.rs index 331db1968..331bab7a0 100644 --- a/embassy-stm32/src/rcc/h.rs +++ b/embassy-stm32/src/rcc/h.rs | |||
| @@ -431,13 +431,10 @@ pub(crate) unsafe fn init(config: Config) { | |||
| 431 | while !RCC.cr().read().hsirdy() {} | 431 | while !RCC.cr().read().hsirdy() {} |
| 432 | 432 | ||
| 433 | #[cfg(stm32h7rs)] | 433 | #[cfg(stm32h7rs)] |
| 434 | let (xspi1sel, xspi2sel) = { | 434 | { |
| 435 | // Save XSPI clock source settings and switch the clock source so it will use HSI | 435 | // Switch the XSPI clock source so it will use HSI |
| 436 | let xspi1sel = RCC.ahbperckselr().read().xspi1sel(); | ||
| 437 | let xspi2sel = RCC.ahbperckselr().read().xspi2sel(); | ||
| 438 | RCC.ahbperckselr().modify(|w| w.set_xspi1sel(Xspisel::HCLK5)); | 436 | RCC.ahbperckselr().modify(|w| w.set_xspi1sel(Xspisel::HCLK5)); |
| 439 | RCC.ahbperckselr().modify(|w| w.set_xspi2sel(Xspisel::HCLK5)); | 437 | RCC.ahbperckselr().modify(|w| w.set_xspi2sel(Xspisel::HCLK5)); |
| 440 | (xspi1sel, xspi2sel) | ||
| 441 | }; | 438 | }; |
| 442 | 439 | ||
| 443 | // Use the HSI clock as system clock during the actual clock setup | 440 | // Use the HSI clock as system clock during the actual clock setup |
| @@ -688,13 +685,6 @@ pub(crate) unsafe fn init(config: Config) { | |||
| 688 | 685 | ||
| 689 | config.mux.init(); | 686 | config.mux.init(); |
| 690 | 687 | ||
| 691 | #[cfg(stm32h7rs)] | ||
| 692 | { | ||
| 693 | // Set the XSPI clock source back to what it was originally | ||
| 694 | RCC.ahbperckselr().modify(|w| w.set_xspi1sel(xspi1sel)); | ||
| 695 | RCC.ahbperckselr().modify(|w| w.set_xspi2sel(xspi2sel)); | ||
| 696 | } | ||
| 697 | |||
| 698 | set_clocks!( | 688 | set_clocks!( |
| 699 | sys: Some(sys), | 689 | sys: Some(sys), |
| 700 | hclk1: Some(hclk), | 690 | hclk1: Some(hclk), |
