fabic has joined #rust-embedded
<re_irc> <@d​khayes117:m​atrix.org> I have several redundant functions to go in different modules, so I'm thinking of using macros. The problem is the functions need to take 3 parameters, but how do you type constrain the `$e:expr` ?
<re_irc> <@d​khayes117:m​atrix.org> Hmm, probably not a good use for a macro
starblue3 has joined #rust-embedded
starblue2 has quit [Ping timeout: 272 seconds]
<re_irc> <@l​achlansneff:m​atrix.org> This might be a stupid question, but how do I indicate which EXTI interrupt a GPIO pin should fire?
<re_irc> <@j​orgeig:m​atrix.org> Which MCU?
emerent has quit [Ping timeout: 272 seconds]
emerent has joined #rust-embedded
<re_irc> <@f​irefrommoonlight:m​atrix.org> On Stm32, it's hard set.
<re_irc> <@j​orgeig:m​atrix.org> for example the STM32 I use (STM32WL) has a hard set of available pins per interrupt but you can still select in the SYSCFG registers:
fabic has quit [Ping timeout: 268 seconds]
jasperw has quit [Ping timeout: 272 seconds]
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 248 seconds]
<re_irc> <@j​duchniewicz:m​atrix.org> hi, was there a meeting yesterday? I forgot to attend and I would like to discuss the backtrace in core RFC I am working on
fabic has joined #rust-embedded
<re_irc> <@i​ldar:m​atrix.org> greetings! I've a NEWB question. Can anyone help?
<re_irc> <@i​ldar:m​atrix.org> https://defuse.ca/b/l5mT2fuZ9C6JmmRxhHf8JB
<re_irc> <@i​ldar:m​atrix.org> The MCU shows no input received through RTT down channel
fabic has quit [Ping timeout: 248 seconds]
<re_irc> <@t​herealprof:m​atrix.org> jduchniewicz: That unfortunately didn't happen.
<re_irc> <@j​duchniewicz:m​atrix.org> Ok thanks, I will bring it up on the next meeting then
fabic has joined #rust-embedded
<re_irc> <@j​amesmunns:m​atrix.org> Hey therealprof, I'm looking for some lead-free solder (nb: https://twitter.com/bitshiftmask/status/1425411418447351814), I think you had some you said was super awesome a while back
<Lumpio-> I might have to get some lead free solder and tools as well soon :( Might be selling some stuff and apparently lead is illegal
<Lumpio-> Apparently you'll need to get at least new soldering tips, and anything else that touches the solder too. Because trace amounts are also banned.
<re_irc> <@j​amesmunns:m​atrix.org> Yeah, that makes sense for production, this is mostly for personal project stuff
<Lumpio-> Although I'm hoping to outsource everything to JLCPCB if I ever end up selling something
<re_irc> <@l​achlansneff:m​atrix.org> jorgeig: Ah thank you. I found the SYSCFG register docs in the reference manual for the MCU I’m using
<re_irc> <@t​herealprof:m​atrix.org> jamesmunns: Felder ISO-Core Clear Sn100Ni+
<re_irc> <@j​amesmunns:m​atrix.org> Thank you!
<re_irc> <@t​herealprof:m​atrix.org> No worries. It's also available from other brands but since you're in Germany(?) that should be possible to get.
<re_irc> <@j​amesmunns:m​atrix.org> Where do you usually source from?
<re_irc> <@j​amesmunns:m​atrix.org> (and yeah, still in Berlin :D )
<re_irc> <@t​herealprof:m​atrix.org> Well, ususlly the smaller electronics/tools supplies like völkner or reichelt but you can get that pretty much everywhere here.
<Lumpio-> https://www.aoyue.eu/felder-solder-wire-iso-core-clear-sn100ni-1mm-01kg.html oh it's actually not too expensive to try
<Lumpio-> I might try it out
<re_irc> <@j​amesmunns:m​atrix.org> Gotcha! Did a quick search on digikey and didn't find anything, but I can put in a reichelt order
<re_irc> <@t​herealprof:m​atrix.org> rs components has it.
<re_irc> <@t​herealprof:m​atrix.org> Digikey is not really German or anywhere close. ;)
<re_irc> <@t​herealprof:m​atrix.org> LOL, even Kaufland (a super market) has it.
<Lumpio-> Hopefully RS doesn't ship from Brexitland
<re_irc> <@j​amesmunns:m​atrix.org> lol, I'm aware Digikey is US based, but honestly: despite that they tend to get packages to me faster than even the European distributors :p
fabic has quit [Ping timeout: 268 seconds]
<re_irc> <@t​herealprof:m​atrix.org> Yeah, but I wouldn't expect US distributors to carry a German solder brand necessarily.
<re_irc> <@j​amesmunns:m​atrix.org> That's fair (and seems to be true!)
<re_irc> <@j​amesmunns:m​atrix.org> But if I could "chuck it in the cart" with other crap I need, it saves shipping :D
<re_irc> <@j​amesmunns:m​atrix.org> But thanks again!
<re_irc> <@t​herealprof:m​atrix.org> I do have a shipping flatrate at völkner anyways so that's not a problem for me. 😉
<re_irc> <@t​herealprof:m​atrix.org> Could also go Amazon or Ebay.
<re_irc> <@j​amesmunns:m​atrix.org> oh, I can get it tomorrow lol
<re_irc> <@t​herealprof:m​atrix.org> I do prefer thinner than 1mm though. ;)
<re_irc> <@j​amesmunns:m​atrix.org> Yeah, I usually have something fine and something thicc
<re_irc> <@j​amesmunns:m​atrix.org> 1mm is pretty chonky though
<re_irc> <@t​herealprof:m​atrix.org> There're also variations with other flux and slightly different alloys but I love that specific one, YMMV. Let me know how you find it.
<re_irc> <@j​amesmunns:m​atrix.org> Yeah, will do!
<re_irc> <@h​enrik_alser:m​atrix.org> Thanks therealprof will try it too, i've been searching for ages for one that isn't crap
<re_irc> <@h​enrik_alser:m​atrix.org> (well i've found workable ones but none that compare to Pb)
<re_irc> <@j​amesmunns:m​atrix.org> Also, any suggestions for (roughly) calibrating my soldering iron temp? I've managed to completely detach my iron from reality by accidentally changing CAL temp instead of SET temp (silly Hakko two-button menu system)
<re_irc> <@j​amesmunns:m​atrix.org> I've now got it to... some? temp that melts solder
<re_irc> <@j​amesmunns:m​atrix.org> which is nice, but esp if I'm switching to led free, it would probably be a good time to re-cal
<re_irc> <@t​herealprof:m​atrix.org> I'm using 320° for normal joints, bumping up to 350° for heatsinking stuff.
<re_irc> <@j​amesmunns:m​atrix.org> Maybe I should just get a cheap K-thermocouple and some kind of reader (sadly my multimeter doesn't have a thermo probe feature)
<Lumpio-> I also found that on amazon.de in 0.5mm but it was sold out unfortunately
<re_irc> <@j​amesmunns:m​atrix.org> My iron is currently set to "I guess that melted the header to the proto board pretty quickly"
<re_irc> <@j​amesmunns:m​atrix.org> err, melted the solder to connect a header to a proto board pretty quickly
<Lumpio-> You can get a soldering iron thermometer for cheap from China - which might at least give you a hint
<Lumpio-> But then again you can't know how accurate those are.
fabic has joined #rust-embedded
<Lumpio-> You'd think it wouldn't be that hard to make a thermometer though.
<re_irc> <@j​amesmunns:m​atrix.org> Yeah, I don't need precision cal, but +/- 10 degrees would be nice
<re_irc> <@j​amesmunns:m​atrix.org> For a K-thermocouple, I'd probably just do a quick two-point cal with freezing water and boiling water
<re_irc> <@j​amesmunns:m​atrix.org> and extrapolate from there
<re_irc> <@j​amesmunns:m​atrix.org> Not super precise, but should get me in the ballpark, I guess
<re_irc> <@j​amesmunns:m​atrix.org> Should be Good Enough™️ for extrapolating to the 200-300-400 C range
<re_irc> <@j​amesmunns:m​atrix.org> Lumpio-: I'll probably order https://www.amazon.de/Felder-Solder-ISO-Core-Sn100Ni-3CuNiGe/dp/B00UK4GT24
<Lumpio-> Aww, not dispatched by Amazon so no free delivery
<re_irc> <@j​amesmunns:m​atrix.org> I'll probably also just get a https://www.amazon.de/-/en/Thermometer-Channels-Thermocouple-Backlight-Temperature/dp/B071RNW2C6/ too
<re_irc> <@j​amesmunns:m​atrix.org> 25 is worth it to have a general thermocouple reader around, and the probes that one comes with look like the kind I've soldered to boards before to do thermal mass tracking for reflow profiles
<re_irc> <@j​amesmunns:m​atrix.org> > Do not test objects over 250C
<re_irc> <@j​amesmunns:m​atrix.org> hmmmm
<re_irc> <@j​amesmunns:m​atrix.org> I guess I could do a lower temp cal
<re_irc> <@j​amesmunns:m​atrix.org> like at 200C for the soldering iron. It doesn't have a super fancy cal profile, just a single setpoint anyway
<Lumpio-> Maybe the thermocouple wire itself just isn't rated for that high
<re_irc> <@j​amesmunns:m​atrix.org> Yeah, the meter will go higher
<Lumpio-> There's probably higher temp ones, I think K type can go quite a bit higher
<re_irc> <@j​amesmunns:m​atrix.org> I think they just put crap probes in the starter kit :D
<Lumpio-> I wonder if having solder on your thermocouple will upset the readings though, I mean it's conductive
<Lumpio-> And you gotta use solder when testing to get a good reading
<re_irc> <@j​amesmunns:m​atrix.org> thermocouples are a semiconductor joint anyway
<re_irc> <@j​amesmunns:m​atrix.org> they are housed in a metal box
<re_irc> <@j​ordens:m​atrix.org> No they are not.
<Lumpio-> They're not semiconductors though are they
<Lumpio-> Just two dissimilar metals together
<re_irc> <@j​amesmunns:m​atrix.org> Err no, you're right
<re_irc> <@j​amesmunns:m​atrix.org> it's not a semiconductor
<re_irc> <@j​amesmunns:m​atrix.org> yup, sorry, wrong effect.
<re_irc> <@j​ordens:m​atrix.org> Solder on thermocouple joints is not an issue as long as long as the temperature gradient is small, i.e. as long as it's not large.
<re_irc> <@j​amesmunns:m​atrix.org> But, I have definitely soldered thermocouples to things like large ground planes as part of a reflow soak
<Lumpio-> Also the thermocouples I got don't have much protection, just a cable with a bit of exposed wires at the end
<re_irc> <@t​herealprof:m​atrix.org> If you just need a single datapoint you could probably just melt the solder and look up the melting point in the datasheet. 😉
<re_irc> <@j​amesmunns:m​atrix.org> therealprof: I thought about that :D
<re_irc> <@j​amesmunns:m​atrix.org> jordens: how large is large?
<re_irc> <@j​amesmunns:m​atrix.org> like, slow-soak with a hot air station instead of using a soldering tip?
<re_irc> <@t​herealprof:m​atrix.org> It's eutectic so there shouldn't be too much guesswork although finding the exactly right spot might take a while. 😉
<re_irc> <@j​amesmunns:m​atrix.org> Yeah, I guess I could just use my "third hand" to hold the iron in place, and poke it with solder until it melts
<re_irc> <@j​ordens:m​atrix.org> If you want 10 C accuracy then there should not be a 10 C gradient over the solderblob-thermocouple-joint area.
<re_irc> <@j​amesmunns:m​atrix.org> Ah, I'd probably use a protoboard (which I think I designed with 0.5 or 1.0mm tracks), solder the thermocouple to one pin, then hold the soldering iron on the next annular ring (2.54mm away)
<re_irc> <@j​ordens:m​atrix.org> If you just want to measure the melting point then don't bother. 😉 It's in the datasheet. If you want to measure your iron temperature, just wrap the thermocouple around the tip and solder away.
<re_irc> <@j​amesmunns:m​atrix.org> (they are only tracks of 5 pins, so it's not THAT much thermal mass, and the copper traces should spread it)
<Lumpio-> The way I've seen people measure iron temperature is to put a blob of solder on the tip and just touch it to a thermocouple or something similar
<re_irc> <@j​amesmunns:m​atrix.org> Yeah, this is just for calibrating my iron.
<Lumpio-> No need to be more fancy, although then you'll have solder on your thermocouple
<Lumpio-> Not a large blob mind you
<re_irc> <@j​amesmunns:m​atrix.org> yeah, just enough for heat transfer
jasperw has joined #rust-embedded
<re_irc> <@f​irefrommoonlight:m​atrix.org> Re lead-free solder: For Sn/Ag wire, keep in mind you'll need a higher temperature than leaded; I've found 360°C works well for most THT components; hotter if they act as a heat sink. Rework past the first go requires added flux. For SMT, a eutectic blend of Sn, Bi, and Ag works well
<re_irc> <@r​yan-summers:m​atrix.org> Shameless plug - We've just published [Miniconf](https://crates.io/crates/miniconf) on crates.io - if you're looking for run-time settings/configuration, give it a look :)
<re_irc> <@r​yan-summers:m​atrix.org> If you have ethernet on your project, miniconf also provides python command-line utilities out-of-the-box for updating run-time configuration values
<re_irc> <@f​irefrommoonlight:m​atrix.org> Do you have an example using miniconf? The code samples in that link only show decorating a struct
<re_irc> <@f​irefrommoonlight:m​atrix.org> What is the use case?
<re_irc> <@f​irefrommoonlight:m​atrix.org> Does it automatically serialize to binary etc? Could I use it to save and load a cfg struct to flash?
<re_irc> <@r​yan-summers:m​atrix.org> There's a sample program in the main docs: https://docs.rs/miniconf/0.1.0/miniconf/#example, there's also an example using MQTT at https://github.com/quartiq/miniconf/blob/develop/examples/mqtt.rs
<re_irc> <@r​yan-summers:m​atrix.org> I wouldn't generally see the purpose of using it to save/load flash-based configurations, unless you stored config in key-value format, which I generally wouldn't advise. It's designed more for run-time usage (e.g. modifying filter coefficients, adjusting sample rates, etc.)
<re_irc> <@r​yan-summers:m​atrix.org> For example on Stabilizer, we use it to allow the user to configure the analog front-end gain, configure IIR filters, configure signal generators, etc. https://github.com/quartiq/stabilizer/blob/master/src/bin/dual-iir.rs#L71
<re_irc> <@r​yan-summers:m​atrix.org> The main key is that it automatically derives a string that maps uniquely into a member of a struct
<re_irc> <@r​yan-summers:m​atrix.org> So you can basically recurse through the struct members using a string to access a specific member using run-time values
<re_irc> <@r​yan-summers:m​atrix.org> So you can do `settings.update("inner/data/0/leaf", b"5")` to do `settings.inner.data[0].leaf = 5`
<re_irc> <@f​irefrommoonlight:m​atrix.org> From that docs example, why do that over updating fields?
<re_irc> <@d​irbaio:m​atrix.org> it's so that you can receive key+value as strings over the network, and apply the change
<re_irc> <@f​irefrommoonlight:m​atrix.org> Thank you
<re_irc> <@r​yan-summers:m​atrix.org> ^ You can also do it via a terminal, like via USB
<re_irc> <@r​yan-summers:m​atrix.org> Or UART, or whatever you'd like that can transfer text
<re_irc> <@f​irefrommoonlight:m​atrix.org> Btw, I do have a use case similar to your sensor config thing in a project, where the user can change config over uart
<re_irc> <@f​irefrommoonlight:m​atrix.org> Although I don't use strings etc - read the byes and update fields a/r
<re_irc> <@f​irefrommoonlight:m​atrix.org> Sounds useful if you pass strings over protocols (?)
<re_irc> <@r​yan-summers:m​atrix.org> Yeah, it's quite nice with MQTT over TCP
<re_irc> <@f​irefrommoonlight:m​atrix.org> Ah, I think my confusion was due to not having experience with either of those
<re_irc> <@j​orgeig:m​atrix.org> On a similar topic, do any of you know of any tool for specifying telemetry and telecommand in an API-like format?
<re_irc> <@j​orgeig:m​atrix.org> E.g. To build this kind of doc:
<re_irc> <@j​orgeig:m​atrix.org> But with a YAML, TOML or similar
<re_irc> <@j​orgeig:m​atrix.org> Like swagger
<re_irc> <@j​orgeig:m​atrix.org> In space applications we use this kind of stuff all the time and I was wondering if there is some good open source tooling to generate it automatically
<re_irc> <@r​icharddodd:m​atrix.org> I'd be interested in any recommendations as well.
<re_irc> <@j​orgeig:m​atrix.org> I found this for the figures https://github.com/czarnota/framegram
<re_irc> <@j​orgeig:m​atrix.org> But was looking for something more complete that would allow me to generate a full doc
GenTooMan has quit [Ping timeout: 272 seconds]
GenTooMan has joined #rust-embedded
<re_irc> <@m​virkkunen:m​atrix.org> LaTeX!
<re_irc> <@b​radleyharden:m​atrix.org> jorgeig, what is the output format of that library? HTML tables? I rolled my own version of something similar, but for a much narrower use case
<re_irc> <@b​radleyharden:m​atrix.org> Sphinx might be an option for a full document. I think it can output PDFs
<re_irc> <@b​radleyharden:m​atrix.org> And it's Python so you could use framegram
fabic has quit [Ping timeout: 258 seconds]
dreamcat4 has quit [Quit: Connection closed for inactivity]
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded