ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
<Andy[m]1> Would #nrf-rs:matrix.org be a better place to ask?
ivche has joined #rust-embedded
ivche has quit [Ping timeout: 248 seconds]
ivche has joined #rust-embedded
starblue has quit [Ping timeout: 248 seconds]
starblue has joined #rust-embedded
<RobinMueller[m]> Andy: What do you mean exactly with "weird reading"?
M9names[m] has joined #rust-embedded
<M9names[m]> This problem was solved in nrf rust
<M9names[m]> s/nrf/nRF/, s/rust/Rust /
pcs38 has joined #rust-embedded
dne has quit [Remote host closed the connection]
dne has joined #rust-embedded
inara has quit [Quit: Leaving]
inara has joined #rust-embedded
Socke has joined #rust-embedded
TomB[m] has joined #rust-embedded
<TomB[m]> I keep wondering what part to use... I don't know if I have a part in mind that does everything I want for a little tinker project I have going on, I'd like to support usb audio class 2, wifi, ble, and have a reasonable way of connecting to an fpga with maybe good support from rust? I guess I could cobble this together... imxrt/stm h7 + a wifi/ble nxp part or something... but was hoping for an all in one
<TomB[m]> imxrt is nice as it as the potential to memory map spi or sram which I could use with an fpga
<TomB[m]> but yeah, the lack of wifi/ble is kind of a bummer
<diondokter[m]> TomB[m]: Sounds like ESP32 could work
<TomB[m]> does it do usb hs?
<JamesMunns[m]> I think maybe the new P4 might?
<TomB[m]> I was thinking esp32, but usb audio class 2
<JamesMunns[m]> current ones definitely don't
<diondokter[m]> Yeah, but P4 doesn
<diondokter[m]> * P4 doesn't have wifi
<TomB[m]> I'm concerned too about how performant the riscv core is on there
<JamesMunns[m]> Yeah, you're probably going to want "big powerful pc with external esp32" probably
<JamesMunns[m]> embassy has a library for the esp32 "radio over a SPI port" drivers
<JamesMunns[m]> s/pc/mcu/
<TomB[m]> well I like the imxrt because its basically a PC without the mmu baggage
<TomB[m]> * mmu baggage, which is why I was initially going that route, but yeah then I'm left going where do I get wifi/ble from
<TomB[m]> so maybe my initial plan wasn't bad then? imxrt and a ble/wifi chip, could be esp32 or a dedicated nxp part I guess
<JamesMunns[m]> Also, you could maybe do QSPI for FPGA interface as well, which might be easier to find chips that support that over parallel SRAM
<TomB[m]> that is very true, though I'm concerned about my ability to hack up some rtl for qspi peripheral :-D sram looked "easy"-ish
<TomB[m]> maybe not as bad as I'm thinking...
<TomB[m]> shift in, decode into address + r/w flag and... go?
<TomB[m]> the sram route had downsides... so many pins... so many
JomerDev[m] has joined #rust-embedded
<JomerDev[m]> TomB[m]: I've recently found an qspi slave example in verilog that might help there :D
<TomB[m]> I started doing a board and I got into one of those stare at the screen moments before walking away
<TomB[m]> JomerDev[m]: that sounds interesting, would love a link
<diondokter[m]> <diondokter[m]> "Hey so, anybody got an idea..." <- Oh idea!
<diondokter[m]> The driver could take a type where you can do a `<PoweredOff, PoweredOn: From<&mut PoweredOff> + embedded_io::Read>`
<diondokter[m]> That's kinda elegant I think
<JamesMunns[m]> In cases I've needed this, I've had a task that owns the peripheral and parts and stuff, and an async function that runs for as long as it needs to, then returns and drops the HAL object
<diondokter[m]> JamesMunns[m]: Yeah that's great when you're working with the HAL directly. But this needs to be more abstracted and go through traits
<JomerDev[m]> TomB[m]: I've forked it to be here: https://github.com/JomerDev/qspis I have a project where I (want to) use an fpga as interface for a parallel bus where the fpga connects to a rp2350's second qspi interface. I want to rewrite it in rhdl (a rust hardware description language) as soon as that is usable
<TomB[m]> hah, figures someone would make a hdl to look like rust, though vhdl is already fairly rust-y in an ada kind of way I think?
<JamesMunns[m]> diondokter[m]: yeah, that's fair. I'm not sure if it gets much better than a top level trait that creates the hal instance, but that might get weird with associated traits
<JomerDev[m]> I haven't used neither vhdl nor verilog so I'm kind of hoping that rhdl is usable soonish so I don't have to fully learn one of them 😅
<TomB[m]> JomerDev[m]: my experience learning vhdl I wonder if it really matters what language you use, the oddities of describing hardware already are a bit of a mind bender, definitely have to think differently...
<TomB[m]> * think differently... like a lot of books/tutorials show both verilog and vhdl side by side
<JomerDev[m]> Fair enough. I've already looked at amaranth, the python hdl, but my python isn't great either and I'd rather learn one thing at a time than two at the same time
<TomB[m]> creating test though I could see being a thing, maybe some langauges are easier to write those in than others
<TomB[m]> I'm far from experienced enough to really say!
<TomB[m]> I like types too much to commit to a python answer to this, my middle aged gray matter can't track all those typeless variables long enough
<diondokter[m]> JamesMunns[m]: Yeah with a trait things become easy again, but for reasons I'm trying to not have that.
<diondokter[m]> Thanks for thinking along!
<TomB[m]> Thanks everyone!
<JomerDev[m]> <TomB[m]> "I like types too much to..." <- Yeah, thats why I'm hoping to use rust as well, so I get some error checking when compiling
realroot[m]1 has joined #rust-embedded
<realroot[m]1> when addin alarm to watchful should i store it to flash? how?
ouilemur has joined #rust-embedded
pcs38 has quit [Quit: leaving]
ello has joined #rust-embedded
pcs38 has joined #rust-embedded
KenMatsui[m] has joined #rust-embedded
<KenMatsui[m]> s/our/my/, s/no_std/no\_std/
<KenMatsui[m]> s/our/my/, s/no_std/no\_std/, s/our/my/
<KenMatsui[m]> Hmm, I cannot see my original post, but is this for everyone?
<realroot[m]1> <KenMatsui[m]> "Hmm, I cannot see my original..." <- i see your previous message
<KenMatsui[m]> realroot[m]1: Oh then just my problem, thank you.
<realroot[m]1> you can use /clear-timeline on nheko
<KenMatsui[m]> Hmm, I'm currently using Element so maybe I cannot?
<realroot[m]1> maybe there is some setting i do not know
GuineaWheek[m] has joined #rust-embedded
<GuineaWheek[m]> is there a way to use embassy-stm32 alongside stm32h7xx-hal? i mostly just want to use the async i2c implementation
<diondokter[m]> <GuineaWheek[m]> "is there a way to use embassy-..." <- There could exist a way to massage everything enough to make it work, but it'd be a mess of hacks. I don't recommend it.
<diondokter[m]> Either move your firmware to embassy fully, or try to extract the async I2C driver from embassy and use that in you project
zeenix[m] has joined #rust-embedded
<zeenix[m]> James Munns: Hey, I think I've bumped into a roadblock with varlink and thought maybe you've some ideas. Tl'dr is that subscriptions (a method with multiple replies in varlink) are expected to completely take over a connection until they end. The reason is that it's designed to work mainly over UDS and UDS connections are super cheap so clients are expected to create many connections to the same service. I'm having difficulty
<zeenix[m]> figuring out how that can work over USB (through embassy-usb) since you've a 1-1 connection there AFAICT (I'm a USB noob so I might be missing something here). I guess I'll have to add another layer (some headers) to make it work. 🤔
<JamesMunns[m]> Postcard-rpc's host client handles multiplexing using keys, but yeah it seems like you'd want to have multiplexed sessions?
<JamesMunns[m]> I actually cheat a lot to do smart things on the host side so the MCU side can be very dumb
<zeenix[m]> Thanks, yeah that makes sense
<JamesMunns[m]> On the host side (and maybe the client side, it's nostd too), you might enjoy https://docs.rs/maitake-sync/latest/maitake_sync/struct.WaitMap.html, which was exactly for async multiplexing/mailboxing
<zeenix[m]> Man, I bumped into so many issues with supporting no_std and no_alloc that I'm very close to giving up on that goal 😆
<JamesMunns[m]> s/client/target/
<zeenix[m]> JamesMunns[m]: Nice! I've seen this crate before but I forgot about it completely.
<zeenix[m]> now that I think of it, you mentioned that crate in our last f2f meeting 😆
jsolano has quit [Quit: leaving]
pcs38 has quit [Quit: leaving]
Ralph[m] has joined #rust-embedded
<Ralph[m]> this is an interesting read on security: https://www.cs.auckland.ac.nz/~pgut001/pubs/bollocks.pdf
<Ralph[m]> it's not embedded specific, but slide 29 contains a nice shout-out to embedded engineers 🙂