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
IlPalazzo-ojiisa has quit [Remote host closed the connection]
starblue1 has quit [Ping timeout: 256 seconds]
starblue1 has joined #rust-embedded
Socke has quit [Ping timeout: 248 seconds]
Socke has joined #rust-embedded
<re_irc> < (@therealprof:matrix.org)> : It is not impossible that this could be a bug in the F4 HAL. Happened more than once that ST implemented bugs or ignored their own errata.
<re_irc> < (@timbod7:matrix.org)> I'm initialising various hardware in the init() function. It's all working fine when started after an stlink upload (via cargo embed), but fails when starting up after a power cycle. This is frustrating to debug, as I only have the rtt logs after a cargo embed - power cycling the device break the rtt connection.
<re_irc> Is there any way to get the rtt output after a power cycle?
<re_irc> < (@9names:matrix.org)> sure, set carg-embed to not flash and not reset on connect. put a big delay at the beginning of startup to give you some time to connect before the init messes stuff up.
<re_irc> < (@timbod7:matrix.org)> Thanks - but that leads to my second question. What the best way to put a delay in the init() function of an rtic program? I'm constructing a Monotonic for subsequent scheduling, but it doesn't start increasing until after the init() function has returned.
<re_irc> < (@timbod7:matrix.org)> * delay/busy wait
<re_irc> < (@9names:matrix.org)> cortex_m::asm::Delay will work anywhere, cortex_m::delay::Delay is probably still fine in init()
<re_irc> < (@timbod7:matrix.org)> will try that.
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
<re_irc> < (@timbod7:matrix.org)> Well, the "cortex_m::asm::delay" worked, in that it paused the init() function. But that made the power on startup bug go away :-( I could leave it there, but I'll try and understand what's needing it.
<re_irc> < (@ryan-summers:matrix.org)> Your RTT can maintain a connection through a reset just fine. Just have your firmware initiate the device reset. Not sure if that would work instead of a power-cycle?
starblue1 has quit [Ping timeout: 260 seconds]
starblue1 has joined #rust-embedded
IlPalazzo-ojiisa has joined #rust-embedded
dc740 has joined #rust-embedded
limpkin has quit [Ping timeout: 264 seconds]
limpkin has joined #rust-embedded
crabbedhaloablut has quit [Quit: No Ping reply in 180 seconds.]
crabbedhaloablut has joined #rust-embedded
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
<re_irc> < (@chemicstry:matrix.org)> what are my options for attaching some constant metadata to each struct member? I have a large configuration struct, but I need each field to also contain constant name, flags, default value, etc. I'm currently using a wrapper "struct Register<T> { name: &'static str, flags: Flags, def_val: T, val: T }", which kind of works, but it really bloats the whole configuration when most of the data could be...
<re_irc> ... in flash instead of ram. As an alternative, I was thinking of a newtype for each field that would implement a "trait Register { const NAME: &'static str; const FLAGS: Flags; const DEFAULT: Self }", but this is really verbose in lines of code. Maybe there is some magic proc macro for such things?
<re_irc> < (@chemicstry:matrix.org)> what are my options for attaching some constant metadata to each struct member? I have a large configuration struct and I need each field to also contain constant name, flags, default value, etc. I'm currently using a wrapper "struct Register<T> { name: &'static str, flags: Flags, def_val: T, val: T }", which kind of works, but it really bloats the whole configuration when most of the data could be in...
<re_irc> ... flash instead of ram. As an alternative, I was thinking of a newtype for each field that would implement a "trait Register { const NAME: &'static str; const FLAGS: Flags; const DEFAULT: Self }", but this is really verbose in lines of code. Maybe there is some magic proc macro for such things?
IlPalazzo-ojiisa has quit [Remote host closed the connection]