stm32/rcc: add better support for L4/L4+ differences.
This commit is contained in:
@ -13,7 +13,7 @@ fn main() -> ! {
|
||||
info!("Hello World!");
|
||||
|
||||
pac::RCC.ccipr().modify(|w| {
|
||||
w.set_adcsel(0b11);
|
||||
w.set_adcsel(pac::rcc::vals::Adcsel::SYSCLK);
|
||||
});
|
||||
pac::RCC.ahb2enr().modify(|w| w.set_adcen(true));
|
||||
|
||||
|
@ -18,8 +18,8 @@ async fn main(_spawner: Spawner) {
|
||||
let mut config = Config::default();
|
||||
config.rcc.mux = ClockSrc::PLL;
|
||||
config.rcc.hsi16 = true;
|
||||
config.rcc.pll_src = PLLSource::HSI16;
|
||||
config.rcc.pll = Some(Pll {
|
||||
source: PLLSource::HSI16,
|
||||
prediv: PllPreDiv::DIV1,
|
||||
mul: PllMul::MUL18,
|
||||
divp: None,
|
||||
|
@ -17,8 +17,8 @@ async fn main(_spawner: Spawner) {
|
||||
let mut config = Config::default();
|
||||
config.rcc.mux = ClockSrc::PLL;
|
||||
config.rcc.hse = Some(Hertz::mhz(8));
|
||||
config.rcc.pll_src = PLLSource::HSE;
|
||||
config.rcc.pll = Some(Pll {
|
||||
source: PLLSource::HSE,
|
||||
prediv: PllPreDiv::DIV1,
|
||||
mul: PllMul::MUL20,
|
||||
divp: None,
|
||||
|
@ -79,8 +79,8 @@ async fn main(spawner: Spawner) {
|
||||
// 80MHz highest frequency for flash 0 wait.
|
||||
config.rcc.mux = ClockSrc::PLL;
|
||||
config.rcc.hse = Some(Hertz::mhz(8));
|
||||
config.rcc.pll_src = PLLSource::HSE;
|
||||
config.rcc.pll = Some(Pll {
|
||||
source: PLLSource::HSE,
|
||||
prediv: PllPreDiv::DIV1,
|
||||
mul: PllMul::MUL20,
|
||||
divp: None,
|
||||
|
@ -26,8 +26,8 @@ async fn main(_spawner: Spawner) {
|
||||
config.rcc.hsi48 = true;
|
||||
config.rcc.mux = ClockSrc::PLL;
|
||||
config.rcc.hsi16 = true;
|
||||
config.rcc.pll_src = PLLSource::HSI16;
|
||||
config.rcc.pll = Some(Pll {
|
||||
source: PLLSource::HSI16,
|
||||
prediv: PllPreDiv::DIV1,
|
||||
mul: PllMul::MUL10,
|
||||
divp: None,
|
||||
|
Reference in New Issue
Block a user