<re_irc>
<@huntc:matrix.org> jacobrosenthal:matrix.org: That's just what I've been looking for. Thanks!
PyroPeter has quit [Ping timeout: 268 seconds]
PyroPeter has joined #rust-embedded
<re_irc>
<@lulf_:matrix.org> Christopher Hunt: not yet on the embedded side, but that crate sure looks promising!
fabic has joined #rust-embedded
dcz has joined #rust-embedded
hifi has quit [Remote host closed the connection]
hifi has joined #rust-embedded
gsalazar has joined #rust-embedded
dcz has quit [Ping timeout: 252 seconds]
gsalazar has quit [Read error: Connection reset by peer]
gsalazar has joined #rust-embedded
<re_irc>
<@chrysn:privacytools.io> yruama_lairba:matrix.org: Some of the EFM32 had it as their only option to atomically set or clear bits
<re_irc>
<@chrysn:privacytools.io> AIU it's deprecated from the ARM side, and will probably not be endorsed in new devices -- but there's hardware out there that's only usable this way.
fabic has quit [Ping timeout: 264 seconds]
<re_irc>
<@chrysn:privacytools.io> yruama_lairba:matrix.org: I don't know the particular implementation, but might that be inlined code where the assert conditions are checked at build time?
<re_irc>
<@chrysn:privacytools.io> (const errors are just being stabilized, but that doesn't mean that the assert can not already be checked-and-discarded at build time in many cases)
<re_irc>
<@therealprof:matrix.org> bitbanding is only useful in a few very specific cases like chrysn mentioned since you can only change exactly 1 bit at a time. There're a few vendors who relied on BB to do things like setting a GPIO output individually although the vast majority of vendors has separate set and clear registers (and in case of rp2040 even an XOR register) but in most cases it's really just useful for enabling/disabling...
<re_irc>
... and clearing individual error bits in a race free manner (and even those sometimes have funny strings attached).
gsalazar has quit [Remote host closed the connection]
gsalazar has joined #rust-embedded
gsalazar has quit [Ping timeout: 246 seconds]
Foxyloxy has quit [Ping timeout: 260 seconds]
Foxyloxy has joined #rust-embedded
fabic has joined #rust-embedded
dcz has joined #rust-embedded
dcz has quit [Read error: Connection reset by peer]
dcz has joined #rust-embedded
<re_irc>
<@jyelloz:matrix.org> Hi, does anyone here have experience using the usbd-hid crate? I am having an issue where the HID descriptor generated at https://github.com/twitchyliquid64/usbd-hid/blob/master/src/descriptor.rs#L97 appears to be slightly incorrect . I would expect the second-to-last byte to be 0x00 but it is actually 0x02 when I run cargo expand. Strange thing is that I built something about a month ago and it worked fine.
<re_irc>
<@jyelloz:matrix.org> Aargh, downgrading proc-macro2 by a few point releases seems to have made the problem go away.
<re_irc>
<@jyelloz:matrix.org> Actually, it looks like the problem seems to be a change from sym 1.0.75 to 1.0.76 after further investigation.
fabic has quit [Ping timeout: 252 seconds]
<re_irc>
<@yruama_lairba:matrix.org> hello, what is the difference between 'wait for interrupt' and 'wait for event' ? how i should use that in rtic context when there is no work ?
<re_irc>
<@lulf_:matrix.org> What’s a good way to acquire a seed for random numbers? Use ADC and sample some pin? Doesn’t need to be secure, just somewhat random
<re_irc>
<@dirbaio:matrix.org> ideally use a HW RNG peripehral
<re_irc>
<@lulf_:matrix.org> There is none on this chip
<re_irc>
<@dirbaio:matrix.org> :'(
<re_irc>
<@dirbaio:matrix.org> adc could work
<re_irc>
<@dirbaio:matrix.org> or the time from an rtc if you have one
<re_irc>
<@lulf_:matrix.org> Rtc exists
<re_irc>
<@dirbaio:matrix.org> or if you have some sort of UI, clock cycles until the user presses buttons
<re_irc>
<@lulf_:matrix.org> Also tried sampling radio in RX mode but wasn’t random :p
<re_irc>
<@dirbaio:matrix.org> timing of radio/network packets
<re_irc>
<@lulf_:matrix.org> I’ll try some of these out, thanks
<re_irc>
<@adamgreig:matrix.org> adc on a pin isn't great if it needs to be at all secure/used for cryptography
<re_irc>
<@adamgreig:matrix.org> timing of external things is classic
<re_irc>
<@dirbaio:matrix.org> yea none of these are great for crypto
<re_irc>
<@almindor:matrix.org> maybe we should make a SPI decay based RNG module
fooker has quit [Ping timeout: 260 seconds]
dcz_ has quit [Ping timeout: 252 seconds]
fooker has joined #rust-embedded
<re_irc>
<@braincode:matrix.org> This USB NXP errata blew my mind, when diagnosing yet another CANtact Pro issue:
<re_irc>
<@braincode:matrix.org> Are there any good bxcan based projects that have good performance and are suitable as a general purpose CAN dongle kind of thing?
<re_irc>
<@braincode:matrix.org> Thinking about reflashing its firmware since it hasn’t seen updates in ~3 years and just want a reliable CAN dongle that I can trust, compatible with existing userspace tooling (SocketCAN, SavvyCAN et al)
<re_irc>
<@yruama_lairba:matrix.org> i may have more help here. i have a issue when doing "cargo check --all-target" with #![no_std] crate, it trigger 'error[E0463]: can't find crate for `test`'
<re_irc>
<@yruama_lairba:matrix.org> how i can solve that ?
<re_irc>
<@braincode:matrix.org> yruama_lairba:matrix.org: Did you try rustc —explain E0463?
<re_irc>
<@yruama_lairba:matrix.org> but the explanation is about missing crate in general, it's useless regarding my issue
<re_irc>
<@yruama_lairba:matrix.org> i also searched in the web, but i only find closed issues on github that don't the solution
<re_irc>
<@braincode:matrix.org> Hmm perhaps the test section is not well closed? I'd check how other projects write the tests and compare?
<re_irc>
<@jannic:matrix.org> Is there some migration plan for embedded-hal 1.0.0? Will there be some kind of semver-trick to make 1.0.0 work together with 0.2, or will the whole ecosystem need to migrate at once?
<re_irc>
<@jannic:matrix.org> (Background: I just ported some simple rp2040 firmware using USB serial and ws2812-pio to embedded-hal v1.0.0-alpha.5, and it was quite a fight to get it running.)
<re_irc>
<@dirbaio:matrix.org> I read somewhere it was decided to not do weird semver-tricks
<re_irc>
<@dirbaio:matrix.org> (even if it was possible to)
<re_irc>
<@dirbaio:matrix.org> it's also possible for HALs to depend on both e-h versions and implement both
<re_irc>
<@jannic:matrix.org> LOL "add .forward() or .reverse() on any embedded-hal type mismatches". Reminds me of what I've done in the last few hours, only without such a nice wrapper. Thanks for that pointer, looks really useful!
<re_irc>
<@yruama_lairba:matrix.org> braincode: this happen even without test section
<re_irc>
<@dkhayes117:matrix.org> Speaking of ADCs, I saw a really neat article today on a research team that "folds" input signals so that values over the sensors voltage threshold can still be sampled. Pretty neat, https://www.hackster.io/news/making-sensors-more-sensitive-e2c783cdafe7
<re_irc>
<@yruama_lairba:matrix.org> what a nightmare, i though to have solved an issue with a codec but it immediately appear by just using "LateResources" in my app, wich is totally unrelated
emerent is now known as Guest5925
Guest5925 has quit [Killed (calcium.libera.chat (Nickname regained by services))]
emerent has joined #rust-embedded
<re_irc>
<@yruama_lairba:matrix.org> dkhayes117: i read youre link by curiosity, and i absolutly don't understand what is technically done. I'm very sceptical about the "custom algorithm that applies a modulo function to the input"
<re_irc>
<@lachlansneff:matrix.org> dkhayes117:matrix.org: How on earth? That sounds to me like that’d have to be a hardware modification, not just a software one.