AtleoS has quit [Read error: Connection reset by peer]
Artea has quit [Remote host closed the connection]
tamme[m] has quit [Quit: Idle timeout reached: 172800s]
JamesSizeland[m] has quit [Quit: Idle timeout reached: 172800s]
ithinuel[m] has quit [Quit: Idle timeout reached: 172800s]
anton_star has joined #rust-embedded
Artea has joined #rust-embedded
AdamHord- is now known as AdamHorden
mrkajetanp has joined #rust-embedded
sugoi has joined #rust-embedded
sugoi has quit [Ping timeout: 246 seconds]
anton_star has quit [Quit: Client closed]
mrkajetanp has quit [Ping timeout: 255 seconds]
mrkajetanp has joined #rust-embedded
mrkajetanp has quit [Ping timeout: 248 seconds]
mrkajetanp has joined #rust-embedded
mrkajetanp has quit [Ping timeout: 260 seconds]
ivche has quit [Remote host closed the connection]
ivche has joined #rust-embedded
jedugsem[m] has joined #rust-embedded
<jedugsem[m]>
are there common problems with async embassy spi device. Using the Spi from embassy in async works but when transfered though a spi device it hangs
<jedugsem[m]>
Trying to communicate with a w25q nor flash on stm411 blackpill
cbjamo[m] has joined #rust-embedded
<cbjamo[m]>
Were you pulling cs low, then doing a bunch of ops, then raising cs?
<cbjamo[m]>
Because to do that with a SpiDevice you need to collect them up into one transaction. Otherwise your cs won't be held low for the whole command.
mrkajetanp has joined #rust-embedded
tiwalun[m] has quit [Quit: Idle timeout reached: 172800s]
majors has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
majors has joined #rust-embedded
<jedugsem[m]>
Yes im doing transfer in place and in the implementation cs gets pulled low before and high after transaction
mrkajetanp has quit [Ping timeout: 252 seconds]
mrkajetanp has joined #rust-embedded
mrkajetanp has quit [Ping timeout: 246 seconds]
mrkajetanp has joined #rust-embedded
anton_star has joined #rust-embedded
joelsa[m] has quit [Quit: Idle timeout reached: 172800s]
<swedishhat[m]>
Hey folks. I'm building a fairly simple PCB based on the rp2040 and I was interested in programming it with Rust. would it make sense to start with something like Embassy, or should I stay framework-free until the project gets more sophisticated?
<JamesMunns[m]>
I'd highly suggest using either embassy-rp or rp-hal, definitely embassy-rp if you think you'll be interested in trying out async. By using an existing hal it just means that you won't need to write your own drivers from scratch :)
<JamesMunns[m]>
Both embassy or something like rtic will help a ton with things like interrupts, scheduling, and concurrency. It's possible to do yourself, just generally not pleasant until you're comfortable enough with embedded Rust to write something that better matches what you want (and often not necessary at all!)
Ralph[m] has joined #rust-embedded
<Ralph[m]>
<diondokter[m]> "image.png" <- nice!
<Ralph[m]>
are there any plans to implement & make use of `core::error::Error` in `embedded-hal` & the wider embedded rust ecosystem?
<dirbaio[m]>
it's a trait, not a type.
<dirbaio[m]>
HALs are free to implement that trait for their error types with no changes in embedded-hal
<dirbaio[m]>
We can't make embedded-hal require errors to implement the trait (like it requires Debug today), that'd be a breaking change
<dirbaio[m]>
also i'm not sure what that'd gain us. we'd get access to source() but I imagine that's not going to be popular for embedded anyway due to the bloat of dyn
<Ralph[m]>
and i'm not sure if it'd make sense to implement `core:error:Error` for things which currently implement the custom `Error` from e-h, e.g. here:
<JamesMunns[m]>
I've known them since before they started interrupt, we met up to talk about "how not to do firmware bad" and talked a lot about doing more embedded teaching stuff
<JamesMunns[m]>
Them: some of the founders and some early engineering folks
PhilMarkgraf[m] has joined #rust-embedded
<PhilMarkgraf[m]>
Is there an existing library function for converting a byte array into a hexadecimal heapless::String? Something like std::fmt::LowerHex...
<PhilMarkgraf[m]>
Yes, this is easy enough to implement, so no worries if not.
ivmarkov[m] has quit [Quit: Idle timeout reached: 172800s]
<JamesMunns[m]>
Heapless string implements core::fmt::Write, which is usually what I do.
danielb[m] has joined #rust-embedded
<danielb[m]>
heapless also implements ufmt-write which might be a bit slimmer
<danielb[m]>
though admittedly I'm not sure if that changed in this decade 😅
<JamesMunns[m]>
yeah, that's a good call
<JamesMunns[m]>
I spend too much time on the rp2040 and not near the limits :p
i509vcb[m] has joined #rust-embedded
<i509vcb[m]>
I am currently playing with the mspm0 stuff in Rust and that stuff is definitely near the limits
<i509vcb[m]>
The lowest end part is 1k RAM closely followed by 4k
<JamesMunns[m]>
yeah, it works pretty good (with some care) on stm32g0, 8k ram + 16-64k flash
<JamesMunns[m]>
4k would be fine ish depending what you're doing, 1k would be impressive :D
<i509vcb[m]>
I will probably be using the higher RAM parts but the 1k part I am definitely interested in seeing if I can get embassy running on it when I get further along
<i509vcb[m]>
These are dirt cheap at least even at distributors
<vollbrecht[m]>
atmega328pb also only has 2k sram / 32kflash, and a simple executor driven by a timer is definitely possible :D