Sender | Message | Time |
---|---|---|
18 Apr 2024 | ||
bla | Not a best solution, but maybe good test to understand the problem better. | 18:34:28 |
dngrs | yeah I had the same thought | 18:35:51 |
bla | config.rcc.mux.clk48sel = mux::Clk48sel::PLL1_Q; is an addition from march 19. Make sure you're on pretty recent embassy. | 18:35:55 |
bla | Although I'd assume that's a compile error to omit this. | 18:36:03 |
dngrs | yeah, it's all git | 18:36:08 |
dngrs | but good point too, I was about to bring up that this is a fresh checkout, maybe some known bug | 18:36:26 |
bla | HseMode::Bypass - G4 has Oscillator. That might be board specific. | 18:38:06 |
bla | I don't remember what it does though. | 18:38:12 |
bla | config.rcc.mux.clk48sel = mux::Clk48sel::HSI48; I guess that enables HSI instead of HSE. At least partially. | 18:40:12 |
bla | Yeah, I think you need Oscillator. | 18:44:20 |
dngrs | Generated a HSI based configuration with cube and we're getting somewhere. The app still hangs somewhere but it's past the rng init now.
| 19:59:18 |
bla | Try Hse with Oscillator though. :) I'm curious. | 20:34:51 |
dngrs | you mean my previous code, just change Bypass to Oscillator ? | 20:36:19 |
dngrs | (what even is the meaning of this flag?) | 20:36:40 |
bla | It's either oscillator (quartz afaik) using osc_in and out pins, or some generated signal on osc_in only | 20:39:04 |
bla | It supposedly frees the pin. | 20:39:13 |
bla | If I'm not mistaken. | 20:39:19 |
dngrs | In reply to @dngrs:matrix.orgis that what you meant? Or sth different? | 20:40:45 |
19 Apr 2024 | ||
jo_we | In reply to @burrbull:matrix.orgif i have a SPI::Nss pin, and i select the SPI device to let software handle the Nss pin (via CR1 register on stm32f407, bit SSM), is it possible to manually set the pin SPI::Nss high and low? I cant seem to find a working into()-Call that keeps my abstraction, and not require me to set the type to a specific pin? | 13:58:33 |
burrbull | In reply to @jo_we:matrix.orgIf you are using software NSS it should be just Pin<Output<PushPull>>> pin, not an SPI::Nss (which is for hardware NSS, hal's master Spi even does not take it). Just use .into_push_pull_output() on any pin you want to use as Nss.( impl embedded_hal::digital::Output if you need generics) | 15:30:05 |
jo_we | hm but if i take a Pin<Output<PushPull>>>, i cannot verify that i get a pin specifically designed to be an NSS pin (according to the datasheet). thats what i want to achieve. I want a pin via function parameter from which i know that its intended usage is as SPI::Nss, which I'll have to set high or low manually | 15:34:18 |
burrbull | In reply to @jo_we:matrix.orgYou can use ANY output pin for NSS. Several ones if you manage several devices. Datasheet specifies only hardware-driven NSS. | 15:41:48 |
burrbull | In reply to @jo_we:matrix.org* You can use ANY output pin for NSS (including but not limited by that is in datasheet). Several ones if you manage several devices. Datasheet specifies only hardware-driven NSS. | 15:43:53 |
jo_we | yes, for sure, I know that i can use any output pin for datasheet, however the hal defines via SPI::Nss spezializations which pins the datasheet assigns as Nss intended use. for example for spi3 (Implementation of SpiCommon)
id like my function parameter to be limited to these pins all while switching them manually internally | 15:52:53 |
jo_we | is anything like that possible? | 15:53:24 |
jo_we | * yes, for sure, I know that i can use any output pin for NSS, however the hal defines via SPI::Nss spezializations which pins the datasheet assigns as Nss intended use. for example for spi3 (Implementation of SpiCommon)
id like my function parameter to be limited to these pins all while switching them manually internally | 15:54:52 |
jo_we | * yes, for sure, I know that i can use any output pin for NSS, however the hal defines via SPI::Nss spezializations which pins the datasheet assigns as Nss intended use. for example for spi3 (Implementation of SpiCommon) under src/gpio/alt/f4.rs
id like my function parameter to be limited to these pins all while switching them manually internally | 15:55:44 |
jo_we | * yes, for sure, I know that i can use any output pin for NSS, however the hal defines via SPI::Nss spezializations which pins the datasheet assigns as Nss intended use. for example for spi3 (Implementation of SpiCommon) under
id like my function parameter to be limited to these pins all while switching them manually internally | 15:55:58 |
burrbull | In reply to @jo_we:matrix.orgMaybe if you create your own trait? Something like this should work: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=57a9677aab05988055f2f3e26395e872 | 16:02:57 |
Kevin Ly joined the room. | 16:07:38 |