emerent has quit [Ping timeout: 256 seconds]
emerent has joined #rust-embedded
starblue2 has joined #rust-embedded
starblue1 has quit [Ping timeout: 256 seconds]
GenTooMan has quit [Ping timeout: 256 seconds]
GenTooMan has joined #rust-embedded
GenTooMan has quit [Ping timeout: 258 seconds]
GenTooMan has joined #rust-embedded
GenTooMan has quit [Excess Flood]
GenTooMan has joined #rust-embedded
fabic has joined #rust-embedded
emerent has quit [Remote host closed the connection]
emerent has joined #rust-embedded
<re_irc> <@j​amesmunns:m​atrix.org> U007D: AFAICT from the schematic, on page 5, it looks like `PWM0_{1-4}` are ONLY connected to the RGB LED and LED D12 (over on the right side of the page)
<re_irc> <@j​amesmunns:m​atrix.org> It seems the pin names are: C9, A8, C8, F9
<re_irc> <@j​amesmunns:m​atrix.org> I *think* the only PWM pin brought out to a header is `PWM1_0`, package pin E10, is brought out to header J8 as pin 5. PWM0_x is all used for LEDs, PWM1_1 is N/C, and PWM1_3 and PWM1_4 is used to control the on-board fans
<re_irc> <@d​isasm-ewg:m​atrix.org> U007D: I invited you to the pac repo a few days ago, please check your inbox
fabic has quit [Ping timeout: 268 seconds]
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 252 seconds]
<re_irc> <@w​cpannell:m​atrix.org> managed to work around my const fn and --emit asm vs. actual binary woes. For some reason, the --emit asm was able to optimize out the try_into call, but the actual binary did not inline the divison part of it and couldn't see through to the end.
<re_irc> <@w​cpannell:m​atrix.org> replacing the 16_u32MHz().try_into() with just 16_000_000_u32.Hz() made it happy. Now my binary loads a numeric literal into the peripheral just like it should 🎉
<re_irc> <@w​cpannell:m​atrix.org> Moral of the story is that --emit asm is lying liar that lies and I should just use objdump -drS, it has prettier output anyway.
<re_irc> <@w​cpannell:m​atrix.org> thanks for the recommendations!
<re_irc> <@9​names:m​atrix.org> you can also use Ghidra, it's nice if you want a GUI
<re_irc> <@w​cpannell:m​atrix.org> frustratingly, I can get the output binary to match the "--emit asm" .s file by setting codegen-units = 1 with the try_into present
<re_irc> <@w​cpannell:m​atrix.org> 9names: I saw that in a blog post while i was digging into this yesterday and gave it a try. pretty neat.
<re_irc> <@w​cpannell:m​atrix.org> The most useful part of it was the little arrows on the side that show the execution path as it loops and branches around
<re_irc> <@w​cpannell:m​atrix.org> that reminds me I need to update ghidra, it's been a few years since I installed it.
<re_irc> <@k​orken89:m​atrix.org> Does anyone know of an CanOpen crate for embedded? I mean to make/receive frames and generate the Dictionary?
fabic has joined #rust-embedded
<re_irc> <@t​herealprof:m​atrix.org> Oooh... https://github.com/rust-lang/rust/pull/87666
<re_irc> <@9​names:m​atrix.org> yeah it's merged :D
<re_irc> <@9​names:m​atrix.org> curious if we'll see anyone else try to use the newlib + posix emulation interface now that esp-idf is in std
<re_irc> <@9​names:m​atrix.org> probably a good fit for the likes of nuttx
<re_irc> <@l​achlansneff:m​atrix.org> Interesting that the espresso riscv chips lack atomics
<re_irc> <@a​damgreig:m​atrix.org> shame to not use rv32imac i guess, but sounds like their default platform has an illegal instruction hook that emulates atomics using a critical section?
<re_irc> <@a​damgreig:m​atrix.org> I guess it's just like atomic-polyfill lol
<re_irc> <@l​achlansneff:m​atrix.org> Since there’s only one hart, I can’t imagine that real atomics would’ve taken up much silicon
starblue2 has quit [Quit: WeeChat 2.3]
<re_irc> <@d​khayes117:m​atrix.org> At first, I was like whoa what are the riscv espresso chips only to realize youmean espressif 🤣
<re_irc> <@l​achlansneff:m​atrix.org> Oops lmao
<re_irc> <@d​khayes117:m​atrix.org> I think the bl602 chips are shown as imafc but atomic instructions causes an exception. Even the MISA register has the A extension.
fabic has quit [Ping timeout: 245 seconds]
<re_irc> <@d​khayes117:m​atrix.org> A little off topic, but have you seen the company that is 3d printing rockets called relativity?
GenTooMan has quit [Ping timeout: 258 seconds]
GenTooMan has joined #rust-embedded
<re_irc> <@d​khayes117:m​atrix.org> In case you are curious, https://youtu.be/kz165f1g8-E
<re_irc> <@u​007d:m​atrix.org> jamesmunns: Hi, James! Hope all is well with you! Thanks, that's how it looks to me too, despite what page 2 says--I'm happy that someone with more experience can confirm this.
<re_irc> <@u​007d:m​atrix.org> jamesmunns: Very cool. I found a pinout diagram for the FE310, but haven't been able to find one for the FU740--this is good to know, thank you.
<re_irc> <@u​007d:m​atrix.org> disasm: I found it--it went directly to my spam folder and has expired. I'm updating my filters; if you'll try again, it should work this time.
<re_irc> <@f​irefrommoonlight:m​atrix.org> Question on RF approach - I'm designing a simple device - 2 parts: IR sensor magnetically mounted above a stove burner, and a separate unit to read out the temp. Everything but RF is done, and I have a prototype above my stove now. However, due to battery and size issues, I've determined this isn't a...
<re_irc> ... viable product, and I'd like to split into a sensor unit (Sensor, BT xmitter, and coin cell), and base unit, with display and config buttons. I figured I'd use BT since it's popular. Is this the right approach, or is there something simpler I can use?
<re_irc> <@f​irefrommoonlight:m​atrix.org> Of note: I don't need to pair to arbitrary devices, and I'm sending tiny amounts of information. Mainly a 4-byte float once a second or so, and only when the stove is hot
<re_irc> <@f​irefrommoonlight:m​atrix.org> And... if anyone has any learning bluetooth resources you've liked, I'm all ears
<re_irc> <@f​irefrommoonlight:m​atrix.org> (The prototype is plug-in, and couples the display location with burner, which isn't desirable)
<re_irc> <@f​irefrommoonlight:m​atrix.org> For example, for BT, would I start with the BT LE spec? A course? A document? NRF softdevice docs/examples? Host Controller Interface?
<re_irc> <@f​irefrommoonlight:m​atrix.org> Goal is send some bytes over the Aether, vice a deep understanding
<re_irc> <@l​achlansneff:m​atrix.org> dkhayes117: Pretty neat!
<re_irc> <@f​irefrommoonlight:m​atrix.org> (Maybe for STM32WB, but not NRF, since HCI is built into softdevice? Maybe also built into WB core2?
<re_irc> <@f​irefrommoonlight:m​atrix.org> Maybe use bluetooth GAP only: Eg send all the data in an advertising packet, since data only needs to flow one-way?
<re_irc> <@f​irefrommoonlight:m​atrix.org> And then you could view the temp on your phone too or something?
<re_irc> <@a​damgreig:m​atrix.org> bluetooth seems way overkill for sending a few bytes between two custom devices that are close together
<re_irc> <@a​damgreig:m​atrix.org> maybe you can replace the entire base unit with a phone app, and then bluetooth is a good option
<re_irc> <@f​irefrommoonlight:m​atrix.org> This begs the question: what alternative is there?
<re_irc> <@a​damgreig:m​atrix.org> i would probably consider using something like stm32wl, nrf52, or a separate radio IC like sx1261 or si4463 or whatever that can just send short radio packets over something like lora, direct g/m/fsk modulation, that sort of thing, which present various levels of easy/custom/control
<re_irc> <@f​irefrommoonlight:m​atrix.org> (Also, would prefer a base station so you don't have to have your phone with you/unlocked/awake)
<re_irc> <@a​damgreig:m​atrix.org> there's a lot of sub-ghz and 2.4ghz options that are non-bluetooth and thus are much much simpler, in terms of packet overhead and software complexity
<re_irc> <@f​irefrommoonlight:m​atrix.org> So, LoRa would be easier, in theory? I jumped on that one due to familiarity with Stm
<re_irc> <@a​damgreig:m​atrix.org> I guess if you already have a working bluetooth stack then whatever, perhaps that's quickest to get going with
<re_irc> <@a​damgreig:m​atrix.org> lora would be easier and simpler _for me_... maybe it would be worth getting some dev boards and having a play around with it
<re_irc> <@f​irefrommoonlight:m​atrix.org> Figured that was more for long range, but honestly whatever is easier is what I need, since I'm getting nowhere so far
<re_irc> <@a​damgreig:m​atrix.org> personally i wouldn't even bother with lora for something like this (or indeed anything, I have philosophical objections to lora but it's not relevant)
<re_irc> <@f​irefrommoonlight:m​atrix.org> Ooh.... Now I'm curious, as probably are at least 2 others here...)
<re_irc> <@a​damgreig:m​atrix.org> just the boring sub-ghz modes will transmit a string of bytes out one end and receive on the other, but there's a bunch of caveats around stuff you then have to manage yourself like error detection, preambles, bla bla, which perhaps a bluetooth stack takes care of for you
<re_irc> <@a​damgreig:m​atrix.org> I think the nrf devices have some stuff to take care of a lot of this for you? perhaps the stm32wl do too, I've not used them... really you probably want opinions from people who've used either of those, all I can suggest is that bluetooth seems overkill between two nearby devices that are both made by you, and...
<re_irc> ... simpler solutions should exist
<re_irc> <@n​ewam:m​atrix.org> The one disadvantage of LoRa is that when it goes wrong it can be hard to decode because the modulation scheme is proprietary, you have to rely on 3rd party information or your own reverse engineering to decode it.
<re_irc> <@n​ewam:m​atrix.org> Apart from that it is pretty good, lives up to most of the marketing.
<re_irc> <@n​ewam:m​atrix.org> Yeah the STM32WL takes care of preamble/crc and most of the boilerplate
<re_irc> <@n​ewam:m​atrix.org> It's pretty much 0-255 bytes in (note: not 256) 0-255 bytes out.
<re_irc> <@a​damgreig:m​atrix.org> gotta say I wish the stm32wl existed back when I was using an Si1062 8051+sub-GHz radio, it was so gross
<re_irc> <@a​damgreig:m​atrix.org> as far as I can tell without an x-ray, they literally glued an si4462 SPI radio IC and an 8051 core to the same carrier, then bond wired four SPI lines between them
<re_irc> <@a​damgreig:m​atrix.org> documentation couldn't even be bothered to tell you which SPI peripheral was connected
<re_irc> <@f​irefrommoonlight:m​atrix.org> Maybe the answer is the other thing you proposed: an i2c etc rf module that perhaps has a serial-like RF interface?
<re_irc> <@a​damgreig:m​atrix.org> half the package pins were for the radio, half for the 8051, including separate power
<re_irc> <@f​irefrommoonlight:m​atrix.org> Search on Digikey for "2.4ghz radio module" etx
<re_irc> <@a​damgreig:m​atrix.org> it probably would be spi rather than i2c, that's an option but probably more expensive than doing it yourself
<re_irc> <@a​damgreig:m​atrix.org> zigbee was a very popular option for this sort of thing in the past
<re_irc> <@a​damgreig:m​atrix.org> buy a cute xbee module for each end, can treat it as a uart serial link
<re_irc> <@a​damgreig:m​atrix.org> I still have like 20 xbees kicking around somewhere
<re_irc> <@a​damgreig:m​atrix.org> stm32wl would be way cheaper in hardware cost I expect
<re_irc> <@n​ewam:m​atrix.org> adamgreig: If you can find anywhere to buy the chips right now that is
<re_irc> <@f​irefrommoonlight:m​atrix.org> Oooo. That sounds great.
<re_irc> <@a​damgreig:m​atrix.org> hah, yea, well, that applies to everything I guess
<re_irc> <@f​irefrommoonlight:m​atrix.org> Could pair that with a stmL4, since that's what I originally designed it for
<re_irc> <@a​damgreig:m​atrix.org> https://www.digi.com/products/embedded-systems/digi-xbee/rf-modules the xbee stuff is all really lovely
<re_irc> <@a​damgreig:m​atrix.org> well thought out software and APIs and hardware
<re_irc> <@f​irefrommoonlight:m​atrix.org> newam : you've done a lot of work on WL in rust; would I be able to use an example you have etc to send bytes in this way?
<re_irc> <@a​damgreig:m​atrix.org> complexity controllable from "pretend to be a long UART wire" through to "set up a mesh network with routers and forward these encrypted signed packets around"
<re_irc> <@f​irefrommoonlight:m​atrix.org> I still need to do some bugfixes on WL support on stm32-hal, but should be easy
<re_irc> <@f​irefrommoonlight:m​atrix.org> Your first complexity description is perfect
<re_irc> <@f​irefrommoonlight:m​atrix.org> Dude, I may just buy those Xbee modules and try it with dev boards. You may have solved this
<re_irc> <@a​damgreig:m​atrix.org> the new xbee 3 does 802.15.4, zigbee, and also BLE
<re_irc> <@a​damgreig:m​atrix.org> so you could still BLE to a phone, I guess
<re_irc> <@a​damgreig:m​atrix.org> (I think they can use the BLE to phone to let you do setup too, cute)
<re_irc> <@a​damgreig:m​atrix.org> looks like they run micropython now too
<re_irc> <@f​irefrommoonlight:m​atrix.org> Awesome. Going to have at the RM
<re_irc> <@n​ewam:m​atrix.org> firefrommoonlight: Yes though xbee would be less effort in this case if part cost doesn't matter.
<re_irc> <@f​irefrommoonlight:m​atrix.org> Part cost does... Hmm
<re_irc> <@f​irefrommoonlight:m​atrix.org> Prices aren't displayed on Xbee site... Rule of thumb means I can't afford it :/
<re_irc> <@f​irefrommoonlight:m​atrix.org> It looks like the examples in stm32wl-hal don't include RF
<re_irc> <@f​irefrommoonlight:m​atrix.org> Ok, found on Digikey. Looks like $40/module, which is far too expensive
<re_irc> <@a​damgreig:m​atrix.org> I'm seeing like $17 on sparkfun https://www.sparkfun.com/products/15126
<re_irc> <@a​damgreig:m​atrix.org> presumably cheaper in moderate qty
<re_irc> <@f​irefrommoonlight:m​atrix.org> Hmm. Certified nRF or STM32W* modules are ~$10 each in qtys of 100, so was hoping to get aroudn that range
<re_irc> <@f​irefrommoonlight:m​atrix.org> I don't think it would be a viable product with much more than that, given I need 2
<re_irc> <@f​irefrommoonlight:m​atrix.org> (AND the MCU would still need to be on top of those)
<re_irc> <@f​irefrommoonlight:m​atrix.org> So this may rule that brand out on price
<re_irc> <@f​irefrommoonlight:m​atrix.org> Eg $15 (maybe cheaper?) + $5 x 2 is $40 for the mcu+RF alone
<re_irc> <@f​irefrommoonlight:m​atrix.org> Which is MUCH higher than the nRF and STM solutions, and would make the product too expensive
<re_irc> <@a​damgreig:m​atrix.org> yea, might be
<re_irc> <@a​damgreig:m​atrix.org> you can possibly run your code on the xbee and so not need an mcu at all, and the mcu option still needs the RF passives and antenna etc, but I'm sure it's much cheaper than an xbee
<re_irc> <@f​irefrommoonlight:m​atrix.org> dirbaio: apparnetly gets nRF modules at $5 USD each, but don't know what QTY that's at
<re_irc> <@a​damgreig:m​atrix.org> modules or ICs?
<re_irc> <@f​irefrommoonlight:m​atrix.org> modules
<re_irc> <@f​irefrommoonlight:m​atrix.org> ie MCU+antenna+xtals in certified package
<re_irc> <@f​irefrommoonlight:m​atrix.org> https://www.digikey.com/en/products/detail/stmicroelectronics/STM32WB5MMGH6TR/13592597?s=N4IgTCBcDaIM4BcC2BmMB3ARgViSAugL5A - STM module (Note out of stock though...)
<re_irc> <@f​irefrommoonlight:m​atrix.org> nRF is messier since their modules are 3rd party, but pricing appears similar
<re_irc> <@f​irefrommoonlight:m​atrix.org> Oh wait that can do zigbee... Maybe answer is STM32WB with zigbee instead of BT?
<re_irc> <@f​irefrommoonlight:m​atrix.org> I haven't looked down that road yet. Maybe simpler? Probably still uses their mailbox systme I haven't yet grokked
<re_irc> <@f​irefrommoonlight:m​atrix.org> Hmm...
<re_irc> <@f​irefrommoonlight:m​atrix.org> nRF serial over BLE sounds... perfect?
<re_irc> <@d​irbaio:m​atrix.org> firefrommoonlight: When did I say that lol
<re_irc> <@f​irefrommoonlight:m​atrix.org> We were comparing stm and nrf and you said the stm was expensive
<re_irc> <@n​ewam:m​atrix.org> firefrommoonlight: Yeah none yet, but there are on-target tests for FSK and LoRa ping-pong
<re_irc> <@d​irbaio:m​atrix.org> Maybe I did :p
<re_irc> <@d​irbaio:m​atrix.org> It may or may not be in quantities of 200, it might be 5eur instead of 5usd
<re_irc> <@f​irefrommoonlight:m​atrix.org> Hah
<re_irc> <@f​irefrommoonlight:m​atrix.org> It seems they're pretty even, at least for modules
<re_irc> <@d​irbaio:m​atrix.org> Custom quote, not off the shelf
<re_irc> <@f​irefrommoonlight:m​atrix.org> That makes sense
<re_irc> <@f​irefrommoonlight:m​atrix.org> I'm not at those volumes :(
starblue has joined #rust-embedded
<re_irc> <@d​khayes117:m​atrix.org> I'm messing around with some APIs for `pmpaddrx.rs` in the riscv crate. I'm getting a `parameter E is never used` error on line 3, and I'm not sure what I am doing wrong. Any insight?
<re_irc> <@d​khayes117:m​atrix.org> https://gist.github.com/926f26687e9821820b830af46fb9e797
<re_irc> <@d​khayes117:m​atrix.org> Hmm, I guess i didn't need to use <E> at all.
<re_irc> <@t​halesfragoso:m​atrix.org> firefrommoonlight: Ebyte modules should be pretty cheap
<re_irc> <@t​halesfragoso:m​atrix.org> It used to be around 5usd on ali, on singles
<re_irc> <@t​halesfragoso:m​atrix.org> You could also use ESB instead of BLE if that fits your constrains
<re_irc> <@f​irefrommoonlight:m​atrix.org> I hadn't heard of ESB - that may be a good bet too
<re_irc> <@f​irefrommoonlight:m​atrix.org> Looks like a proprietary nordic protocol that may also be suitably simple
rjframe has joined #rust-embedded
rjframe has quit [Ping timeout: 248 seconds]
Foxyloxy_ has joined #rust-embedded
rjframe has joined #rust-embedded
rjframe has quit [Ping timeout: 248 seconds]
rjframe has joined #rust-embedded