<re_irc> <@angelonfira:matrix.org> Update to the LED Christmas tree that I was asking for help about a few days ago https://cdn.discordapp.com/attachments/673923003402289184/923366387932594226/20211222_190534.mp4
<re_irc> <@9names:matrix.org> hah, cute!
<re_irc> <@angelonfira:matrix.org> https://github.com/AngelOnFira/rusty-christmas-tree
<re_irc> <@adamgreig:matrix.org> haha amazing!
<re_irc> <@angelonfira:matrix.org> I'm getting students at my university to contribute
<re_irc> <@angelonfira:matrix.org> But if anyone else wants to add a drawing, I'm adding some docs for it now!
<re_irc> <@thebutlah:matrix.org> anyone know about how long it takes for hs-probe to ship? I ordered about 5 days ago and still haven't gotten the shipping confirmation
PyroPeter has quit [Ping timeout: 260 seconds]
PyroPeter has joined #rust-embedded
<re_irc> <@tinco:matrix.org> hi! I'm exploring ethernet (through dma) on the stm32, and the examples all seem to ignore the interrupts and just poll the dma, does that make sense? if I'm running multiple tasks, shouldn't I use interrupts to only do ethernet stuff when bytes are actually available?
<Darius> wouldn't you want interrupts to reload the DMA engine as needed?
Amadiro has joined #rust-embedded
<re_irc> <@tinco:matrix.org> Well yeah, but in the example that's all they're doing, wouldn't I want to let whatever is supposed to read the buffer know that some new stuff is ready?
<re_irc> <@korken89:matrix.org> Aren't the examples checking in the interrupt handler? Eg like here: https://github.com/stm32-rs/stm32h7xx-hal/blob/master/examples/ethernet-rtic-stm32h735g-dk.rs#L225
<re_irc> <@tinco:matrix.org> Ohh you're right, I hadn't noticed that line 229 actually invokes smoltcp, thanks!
<re_irc> <@raghunandan:envs.net> Is there a mqtt client that can run on nrf52 ?
<re_irc> <@gdamjan:spodeli.org> the nrf52 doesn't have networking though
<re_irc> <@raghunandan:envs.net> gdamjan: I'm new to embedded, what does that exactly mean?
<re_irc> <@raghunandan:envs.net> Does that mean that nrf52 for rust doesn't have working TCP/IP stack?
<re_irc> <@k900:0upti.me> There's literally no hardware on the nRF52 to connect to the internet
<re_irc> <@k900:0upti.me> Only Bluetooth and NFC
<re_irc> <@dirbaio:matrix.org> you can certainly do networking in nrf52
<re_irc> <@raghunandan:envs.net> k900:0upti.me: I thought it had a 2.4ghz radio?
<re_irc> <@raghunandan:envs.net> or was that some other MCU
<re_irc> <@dirbaio:matrix.org> it has 2.4ghz, but not wifi
<re_irc> <@k900:0upti.me> 2.4 GHz radio doesn't mean 2.4 GHz WiFi
<re_irc> <@k900:0upti.me> It's a custom protocol
<re_irc> <@dirbaio:matrix.org> it has bluetooth, 802.15.4, zigbee, thread, other stuff
<re_irc> <@raghunandan:envs.net> Oh I see
<re_irc> <@dirbaio:matrix.org> but you can certainly do networking
<re_irc> <@dirbaio:matrix.org> - ipv6 over ieee802.15.4
<re_irc> <@dirbaio:matrix.org> - attach some SPI ethernet chip (wiznets, enc24j60, enc424j600)
<re_irc> <@dirbaio:matrix.org> - ipv6 over BLE
<re_irc> <@dirbaio:matrix.org> - attach some wifi chip (esp8266, esp32)
<re_irc> <@raghunandan:envs.net> I got confused with 2.4Ghz radio means wifi support
<re_irc> <@raghunandan:envs.net> Sorry for asking a noob question, but what is ieee 802.15.4?
<re_irc> <@raghunandan:envs.net> > ipv6 over ieee802.15.4
<re_irc> <@raghunandan:envs.net> ^ what does this mean?
<re_irc> <@jamesmunns:beeper.com> https://en.wikipedia.org/wiki/IEEE_802.15.4
<re_irc> <@jamesmunns:beeper.com> It's sort of like wifi, but meant for much lower power devices
<re_irc> <@jamesmunns:beeper.com> Usually used for sensor networks and things like that
<re_irc> <@jamesmunns:beeper.com> https://en.wikipedia.org/wiki/6LoWPAN and https://en.wikipedia.org/wiki/Thread_(network_protocol) use it (802.15.4) as part of their networking implementation.
<re_irc> <@jamesmunns:beeper.com> 6LoWPAN is specifically a subset of IPv6 designed for sensor networks
<re_irc> <@raghunandan:envs.net> that's very intriguing
<re_irc> <@raghunandan:envs.net> Thanks for the information. I will go read more about it after my day job :)
<re_irc> <@dirbaio:matrix.org> if you want wifi pick a chip that supports wifi though
<re_irc> <@raghunandan:envs.net> dirbaio:matrix.org: no, that wasn't really my requirement.
<re_irc> <@raghunandan:envs.net> I just wanted to learn how to work with microcontrollers using Rust :) I was considering purchasing microbit v2, since the rust discovery book works through that hardware.
<re_irc> <@dirbaio:matrix.org> ah okay! :)
<re_irc> <@dirbaio:matrix.org> then nrf52 is a solid choice, it's quite well supported in rust and quite powerful! 👍️
neceve has joined #rust-embedded
<re_irc> <@dirbaio:matrix.org> how do I make Cargo depend on cortex-m only when building for cortex-m targets?
<re_irc> <@dirbaio:matrix.org> target_arch=arm will pick up cortex-A as well
<re_irc> <@dirbaio:matrix.org> [target.thumbv6m-none-eabi.dependencies]
<re_irc> <@dirbaio:matrix.org> this seems to work, but it's ugly heh
<re_irc> <@dirbaio:matrix.org> cortex-m = "0.7.3"
<re_irc> <@dirbaio:matrix.org> ```toml
<re_irc> <@tholmie:matrix.org> Does adding wild card asterisks work?
<re_irc> <@phufhi:matrix.org> I've gotten the pico_blinky example to work from here: https://github.com/rp-rs/rp-hal/tree/main/boards/pico
<re_irc> <@phufhi:matrix.org> However, when I make my own project, copy the code, add the pico crate to my Cargo file and other crates that errors were asking for, it still doesn't work.
<re_irc> <@phufhi:matrix.org> I'm compiling with "cargo build --release --target=thumbv6m-none-eabi" and running the output file using "elf2uf2-rs -d".
<re_irc> <@phufhi:matrix.org> What am I still missing to make it work?
<re_irc> <@9names:matrix.org> Probably just memory.x (the linker script)
<re_irc> <@phufhi:matrix.org> ok, how do I set this up?
<re_irc> <@dirbaio:matrix.org> phufhi: upload your project somewhere (github) so we can see
<re_irc> <@dirbaio:matrix.org> tholmie:matrix.org: nope :'(
<re_irc> <@dirbaio:matrix.org> also lol you need to quote the target because of the dot `[target."thumbv8m.main-none-eabihf".dependencies]`
<re_irc> <@dirbaio:matrix.org> I hate toml syntax 🤣
<re_irc> <@9names:matrix.org> phufhi: I recommend looking at https://github.com/rp-rs/rp2040-project-template as the setup and dependencies are a little more clear
<re_irc> <@phufhi:matrix.org> thank you 9names!
<re_irc> <@phufhi:matrix.org> memory.x was indeed the problem :)
<re_irc> <@9names:matrix.org> I have had this problem before :)
<re_irc> <@badrb:matrix.org> Is anyone else having issues with nvim-lsp, rust-analyzer and some macros 🔼?
<re_irc> <@adamgreig:matrix.org> thebutlah:matrix.org: maybe ask in #probe-rs:matrix.org
<re_irc> <@yatekii:matrix.org> adamgreig: Ah shoot! I do that in batches, sorry! I will take care of it in my holidays now :)
<re_irc> <@tinco:matrix.org> I seem to be exceptionally bad at reading the datasheet for the stm32h7, I'm trying to figure out where it's documented that the global ethernet interrupt is signal 61, and where it's defined that the RCC peripheral memory address is at 0x58024400, those values should apparently be defined in the datasheet but I don't see references to them anywhere
<re_irc> <@dirbaio:matrix.org> > where it's defined that the RCC peripheral memory address is at 0x58024400
<re_irc> <@dirbaio:matrix.org> reference manual, 2.3.2 table 7
<re_irc> <@tinco:matrix.org> ahh yeah awesome thanks so much!
<re_irc> <@dirbaio:matrix.org> > the global ethernet interrupt is signal 61
<re_irc> <@tinco:matrix.org> it's funny I was doing my work based off the reference manual, and then I couldn't find the interrupt in it, and then I read somewhere I was supposed to be in the datasheet so I looked there couldn't find it, so then I thought to look for an easier value so I randomly picked the RCC address, and that wasn't in the datasheet either so I thought I was going insane
<re_irc> <@tinco:matrix.org> but at least that's clear as day in the reference manual
<re_irc> <@tinco:matrix.org> ahh wait I found it, it's 19.1.2 table 143 I think
<re_irc> <@tinco:matrix.org> yep confirmed alright
<re_irc> <@dirbaio:matrix.org> oh, under NVIC, duh :D
<re_irc> <@dirbaio:matrix.org> nice
<re_irc> <@tinco:matrix.org> this manual is so big.. over 3000 pages
<re_irc> <@firefrommoonlight:matrix.org> Nailed it
<re_irc> <@thejpster:matrix.org> I had a TI datasheet where the literal 32 bit addresses never appear.
<re_irc> <@thejpster:matrix.org> They only ever say, this is at offset 0x00C from UART0.
<re_irc> <@thejpster:matrix.org> And UART0 is at 0x00210000 from APB
<re_irc> <@thejpster:matrix.org> And somewhere it finally says oh, APB is at 0x41000000.
<re_irc> <@thejpster:matrix.org> Search for 4121000C, you get nothing
<re_irc> <@thejpster:matrix.org> (these numbers are for illustrative purposes only. Do not write a UART driver based on the ramblings of an idiot on internet chat)
<re_irc> <@9names:matrix.org> thejpster:matrix.org: Why should I stop now 🤣