emerent has quit [Remote host closed the connection]
emerent has joined #rust-embedded
starblue has quit [Ping timeout: 260 seconds]
starblue has joined #rust-embedded
SanchayanMaity has quit [Ping timeout: 264 seconds]
edm has quit [Ping timeout: 268 seconds]
dreamcat4 has quit [Ping timeout: 268 seconds]
SanchayanMaity has joined #rust-embedded
dreamcat4 has joined #rust-embedded
edm has joined #rust-embedded
fabic has joined #rust-embedded
edm has quit [Ping timeout: 244 seconds]
SanchayanMaity has quit [Ping timeout: 256 seconds]
nohit has quit [Ping timeout: 268 seconds]
nohit has joined #rust-embedded
edm has joined #rust-embedded
SanchayanMaity has joined #rust-embedded
PyroPeter has quit [Ping timeout: 260 seconds]
PyroPeter has joined #rust-embedded
<re_irc>
<@sajattack:matrix.org> newam:matrix.org: Car no do that, car go road
tokomak has joined #rust-embedded
vancz has quit [*.net *.split]
vancz has joined #rust-embedded
Foxyloxy has quit [*.net *.split]
Foxyloxy has joined #rust-embedded
<re_irc>
<@henrik_alser:matrix.org> dbrgn:matrix.coredump.ch: Morning! Yeah do so! What device is it?
<re_irc>
<@henrik_alser:matrix.org> May wanna check the errata of the part for any i2c issues
<re_irc>
<@henrik_alser:matrix.org> You could try inserting a delay between enabling the peripheral clock and before writing and see if there’s a difference
<re_irc>
<@henrik_alser:matrix.org> I think i’ve seen issues in the past with some part in the f4 family where you had to insert a delay between reseting and re-enabling the clock, don’t know if the hal does this already? (This was before my rust days)
<re_irc>
<@henrik_alser:matrix.org> Using stm32f4xx-hal with pin typestates right? So you know the pins are in the right configuration?
<re_irc>
<@dbrgn:matrix.coredump.ch> henrik_alser: it's a MiniF4 devboard ("black pill") with a RTC module. I'll hook up the scope tonight. Thanks for the suggestions!
<re_irc>
<@henrik_alser:matrix.org> 401 or 411 version?
<re_irc>
<@henrik_alser:matrix.org> I’ve seen no issues with the 411 one
crabbedhaloablut has quit [Remote host closed the connection]
<re_irc>
<@jordens:matrix.org> Is there something (example code, macro) that asserts that an `unwrap()` on an infallible Result actually gets optimized away? Maybe using a linker trick? Like a compile-time `unwrap()` that asserts both infallibility and does not generate any unwrap bloat.
<re_irc>
<@henrik_alser:matrix.org> jordens: How about `.unwrap_or_else(|| unsafe { core::hint::unreachable_unchecked() })`
<re_irc>
<@jordens:matrix.org> henrik_alser:matrix.org: Ack. But that's only the optimization part. Whether it is in fact unreachable remains `unchecked`.
<re_irc>
<@henrik_alser:matrix.org> Ahh sorry i misunderstood your question :)
<re_irc>
<@korken89:matrix.org> jordens:matrix.org: If you use a nightly compiler you can use the following flags to remove all panics `-Zbuild-std=core, -Zbuild-std-features=panic_immediate_abort`
<re_irc>
<@rahix:matrix.org> well, but this does not assert whether unwraps are infallible. it just makes them use less space in the binary (at the expense of not being able to catch any panic at all)
<re_irc>
<@wim:dewith.io> Couldn't you use `unreachable_unchecked!()`?
troth has joined #rust-embedded
fabic has quit [Ping timeout: 244 seconds]
troth has quit [Ping timeout: 244 seconds]
creich has quit [Remote host closed the connection]
creich has joined #rust-embedded
<re_irc>
<@qthree:matrix.org> rahix: Hello, I'm trying to use avr-hal and it looks like #[derive(PartialEq)] produces miscompilation when applied to struct with const-generics and array inside.
<re_irc>
<@gauteh:matrix.org> Hi, I'm trying to get an RTC alarm to work with firing an interrupt every second. Trying to debug this I put panic! in the interrupt handler, this should halt everything right? I have an `wfi`, but once I enable the alarm it just keeps spinning. If I don't enable the specific interrupt in NVIC nothing happens. So now I wonder if the interrupt is hooked up at all..
derefnull has quit [Read error: Connection reset by peer]
<re_irc>
<@jamwaffles:matrix.org> Are you clearing the interrupt flag in the handler? The interrupt will keep firing forever if you don't