Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blinky example waiting for embassy_stm32::rcc::init() on STM32H735 Discovery Kit #2430

Closed
wagcampbell opened this issue Jan 10, 2024 · 1 comment

Comments

@wagcampbell
Copy link
Contributor

Hi there 👋

I recently attempted to run the blinky.rs example on an STM32H735 Discovery Kit.

I updated the .cargo/config.toml runner:

runner = 'probe-run --chip STM32H735IGKx'

and Cargo.toml embassy-stm32 features list:

embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h735ig", "time-driver-any", "exti", "memory-x", "unstable-pac", "chrono"] }

After inspecting the backtrace, it seems to be stuck here:
https://github.com/embassy-rs/embassy/blame/main/embassy-stm32/src/rcc/h.rs#L334

    // Validate the supply configuration. If you are stuck here, it is
    // because the voltages on your board do not match those specified
    // in the D3CR.VOS and CR3.SDLEVEL fields. By default after reset
    // VOS = Scale 3, so check that the voltage on the VCAP pins =
    // 1.0V.
    #[cfg(any(pwr_h7rm0433, pwr_h7rm0399, pwr_h7rm0455, pwr_h7rm0468))]
    while !PWR.csr1().read().actvosrdy() {}

I probed 1.3V on the the VCAP pins here:
image
image
image

This issue might be related:
embassy-rs/stm32-data#260

That said, I don't have a strong grasp on how this STM32 data is generated.
I'm pretty early investigating this and plan on reading over RM0468 and studying this more.

Thanks in advance!

@wagcampbell
Copy link
Contributor Author

Hello again,

So, I think I've figured out what's wrong.

I realized the default rcc supply config doesn't match the dev kit. From the dev kit user manual:
image

So, I tried changing the example's rcc supply config to SupplyConfig::DirectSMPS.

    let mut config = embassy_stm32::Config::default();
    {
        use embassy_stm32::rcc::*;
        config.rcc.supply_config = SupplyConfig::DirectSMPS;
    }
    let p = embassy_stm32::init(config);

Unfortunately, this didn't resolve my issue. I also had to perform these steps as documented in the user manual:
image

I haven't figured out where in the reference manual this 'deadlock' state is documented.
That said, the example runs now after performing those recover steps.

Thanks!

sgasse added a commit to sgasse/embedded_buzzer that referenced this issue Jan 16, 2024
Also check in Cargo.lock to avoid issues in the future.

See also:
embassy-rs/embassy#2430
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant