Problem with embassy_stm32::ospi::Ospi::new_*

I have problems creating a new OSPI driver for a quadspi external chip. I get
the trait 'embassy_stm32::ospi::*<embassy_stm32::peripherals::OCTOSPI1>' is not implemented for '*' for all 6 Pins. What am i doing wrong here?
I try it with the current git version of embassy and with rev = "318425040a3a0fd2088e39b72be892cd0c9d3ef8"

That's the code I use:

#![no_std]
#![no_main]

use embassy_executor::Spawner;
use embassy_stm32::dma::NoDma;
use embassy_stm32::ospi::{Config, Ospi};
use panic_probe as _;

#[embassy_executor::main]
async fn main(_spawner: Spawner) {

    let p = embassy_stm32::init(Default::default());
    let mut config = Config::default();

   let qspi = Ospi::new_quadspi(
        p.OCTOSPI1, p.PA3, p.PC9, p.PC10, p.PE2, p.PA6, p.PC11, NoDma, config,
    );

    loop {}
}

Confirm whether these pins are actually usable for OSPI in the datasheet. If they are, it's probably a bug in stm32-data where the pin info is missing due to problems with the xml data. Which chip are you using?

(Also, I suggest joining the Embasy Matrix room, many people using Embassy hang out there and are very helpful)

I use a stm32h730vb.

Yes, I checked the datasheet dozens of times, these Pins have these functions:
OCTOSPIM_P1_ CLK
OCTOSPIM_P1_IO0
OCTOSPIM_P1_IO1
OCTOSPIM_P1_IO2
OCTOSPIM_P1_IO3
OCTOSPIM_P1_NCS

although different alternate functions: for some pins it's AF9, for some it's AF12, for one AF6. Does that matter? If yes, then why do I get all 6 errors?

Thanks for the hint, I checked the stm32-data-generated repo and found all of them:

So, all looks good to me.

Any more suggestions? I'll look into the matrix room too, thanks!

I tried it with all pins to the same AF, AF9 - still no luck, same error message.

Hey looks like the pins for this chip in the generated metapac have a different naming convention than other chips, so the pin traits aren't binding to those pins. Feel free to open a PR for that, I'll take a look as well. You shouldn't need to manually set the alternate functions for the pins.

Thank You very much.
Here it is already:

I'll update it with the findings we made already.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.