dcz_ has joined #rust-embedded
starblue1 has quit [Ping timeout: 252 seconds]
starblue1 has joined #rust-embedded
<re_irc> <@jamesmunns:matrix.org> Galaxy brain: Make a version of the rust stdlib for all mcu targets that includes alloc-cortex-m, and everything that enables (e.g. collections, but not all the socket and file stuff)
<re_irc> <@grantm11235:matrix.org> Isn't that just `alloc`?
PyroPeter has quit [Ping timeout: 240 seconds]
PyroPeter has joined #rust-embedded
dcz_ has quit [Ping timeout: 265 seconds]
<re_irc> <@lachlansneff:matrix.org> Any of you used these switching regulators? The inductor is integrated into the IC! https://www.torex-europe.com/products/micro-dc-dc/inverter/xcl303/
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 265 seconds]
dcz_ has joined #rust-embedded
<re_irc> <@korken89:matrix.org> lachlansneff:matrix.org: Yeah we use similar in our products, works as advertised :)
inara has quit [Quit: Leaving]
inara has joined #rust-embedded
dcz_ has quit [Ping timeout: 252 seconds]
<re_irc> <@richarddodd:matrix.org> Anyone here from Oxford, UK. I met someone who works at the uni's engineering dept. the other day.
<edm> yes
<edm> but it wasn’t me you met
<re_irc> <@richarddodd:matrix.org> Nope, it was a medic, but she's based in the engineering dept. working on wearable devices.
<re_irc> <@therealprof:matrix.org> grantm11235:matrix.org: I would think so. And I believe work is already in progress to blend the lines between core and std even more.
<re_irc> <@therealprof:matrix.org> Also there's some work (can't come up with good search items though) to allow local allocators/custom backing which I personally find a lot more intriguing than a global allocator, especially for embedded.
<re_irc> <@xiretza:xiretza.xyz> https://github.com/rust-lang/rust/issues/32838
dcz_ has joined #rust-embedded
<re_irc> <@therealprof:matrix.org> Thanks, I was aware of that one but couldn't find the relevant links to important work in a jiffy.
<re_irc> <@therealprof:matrix.org> After browsing around a bit it seems like https://github.com/rust-lang/wg-allocators and https://github.com/rust-lang/wg-allocators/issues/48 are most relevant.
<Lumpio-> It's probably decently underway since the stdlib (or liballoc) already shows arguments for the allocator everywhere
<Lumpio-> Not stable yet tho
tokomak has quit [Read error: Connection reset by peer]
fabic has joined #rust-embedded
<re_irc> <@jamesmunns:matrix.org> lachlansneff:matrix.org: I wish they would go up to 20V so I could use them for Anachro :D
<re_irc> <@jorgeig:matrix.org> Same!
<re_irc> <@jorgeig:matrix.org> Well I wish they went up in current
<re_irc> <@jamesmunns:matrix.org> I'm on the hunt for a less-janky version of https://www.aliexpress.com/item/1005001504707858.html
dcz_ has quit [Ping timeout: 252 seconds]
<re_irc> <@lachlansneff:matrix.org> Multiple switching regulators in series :P
<re_irc> <@lachlansneff:matrix.org> (and parallel if you want to increase the current)
fabic has quit [Remote host closed the connection]
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 252 seconds]
GenTooMan has quit [Quit: Leaving]
GenTooMan has joined #rust-embedded
dcz_ has joined #rust-embedded
starblue1 has quit [Ping timeout: 252 seconds]
starblue1 has joined #rust-embedded
starblue1 has quit [Ping timeout: 250 seconds]
starblue1 has joined #rust-embedded
dcz_ has quit [Read error: Connection reset by peer]
dcz_ has joined #rust-embedded
starblue1 has quit [Ping timeout: 252 seconds]
starblue1 has joined #rust-embedded
dcz_ has quit [Ping timeout: 252 seconds]
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 260 seconds]
starblue1 has quit [Ping timeout: 260 seconds]
starblue1 has joined #rust-embedded
<re_irc> <@lachlansneff:matrix.org> Wait, if I enable multimode ADCs, do I need to set up DMA transfers for ADC2 and ADC3, or do they piggyback on the transfer for ADC1?
<re_irc> <@newam:matrix.org> I can't speak for the APIs your using, but the DMAs registers have source addresses that will be different for each ADC, so likely you will need to either re-do setup for the same DMA or use a unique DMA for each
<re_irc> <@lachlansneff:matrix.org> I would've thought so, but the code that i saw online (using C and CubeMx, I think) seemed to have a single DMA transfer and the conversions all got dumped in a single buffer somehow.
<re_irc> <@lachlansneff:matrix.org> I might be reading it really wrong though, C is not easy to read
<re_irc> <@cryptollision:matrix.org> mb the DMA transfer destination is set to sequential memory in a buffer?
<re_irc> <@lachlansneff:matrix.org> mb? But yeah, the destination is sequential memory
<re_irc> <@cryptollision:matrix.org> mb == maybe
<re_irc> <@lachlansneff:matrix.org> I just hadn't seen any reference to them all dumping into the same buffer in the reference manual, but I must have missed it then
<re_irc> <@lachlansneff:matrix.org> https://thece.eu/triple-adc-w-dma/
<re_irc> <@cryptollision:matrix.org> at a quick glance, the section on "DMA Clock Enable" has example for setting the base address. thats probably where the single buffer for all three ADC DMA goes, right?
<re_irc> <@lachlansneff:matrix.org> Yeah, I think the address is this: https://thece.eu/triple-adc-w-dma/#:~:text=DMA_InitStructure.DMA_Memory0BaseAddr%20%20%20%20%3D%20(uint32_t)(%26adc%5B0%5D)%3B
<re_irc> <@yruama_lairba:matrix.org> hello, don't understand everything about what you do with dma and adc, but i'm trying to do something similar
<re_irc> <@lachlansneff:matrix.org> The reference manual mentions something about DMA mode 1 and Triple ADC mode puts the conversions all in a single buffer, the conversions for ADC 1, 2, and 3 in sequence
<re_irc> <@lachlansneff:matrix.org> file:///Users/lachlansneff/Downloads/rm0390-stm32f446xx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
<re_irc> <@lachlansneff:matrix.org> Page 373
<re_irc> <@lachlansneff:matrix.org> But I'm not sure how to specify whatever mode that is for the DMA transfer.
<re_irc> <@cryptollision:matrix.org> DMA_InitStructure.DMA_Mode, looks like
<re_irc> <@yruama_lairba:matrix.org> look very complicated
<re_irc> <@cryptollision:matrix.org> not sure what mode you want to set it to though
<re_irc> <@lachlansneff:matrix.org> I'm using the stm32f4_hal crate, so not sure where that is
<re_irc> <@yruama_lairba:matrix.org> dma implementation is very new in stm32f4_hal and is probably not suitable for complex thing
<re_irc> <@cryptollision:matrix.org> https://github.com/stm32-rs/stm32f4xx-hal/blob/master/src/dma/mod.rs#L55 <- direction
<re_irc> <@yruama_lairba:matrix.org> and honeslty, last time i looked into dma implementation of stm32f4_hal, i just didn't undertand how i was supposed to use it
<re_irc> <@lachlansneff:matrix.org> Yeah, DMA Mode 1 isn't specific enough to actually configure it to do anything
<re_irc> <@lachlansneff:matrix.org> Doesn't mean anything as far as I can tell
<re_irc> <@cryptollision:matrix.org> https://github.com/stm32-rs/stm32f4xx-hal/blob/master/src/dma/mod.rs#L1349 <- set DMA config
<re_irc> <@cryptollision:matrix.org> dont think there is 1:1 mapping, but im not that familiar
<re_irc> <@cryptollision:matrix.org> the crate author frequents the room a lot, though
<re_irc> <@cryptollision:matrix.org> others here are also more knowledgable than me
<re_irc> <@yruama_lairba:matrix.org> the stm32f4xx-hal implementation of DMA doesn't seems to support circular mode...
<re_irc> <@yruama_lairba:matrix.org> i think it's because it's very difficult to create a generic and safe abstrcution for this mode
<re_irc> <@yruama_lairba:matrix.org> have you trick to refactor embedded stuff ? i have a big main.rs because i do many low level manipulation ? is it a good idea to create a setup function for each peripheral i manipulate ?
loki_val is now known as crabbedhaloablut
emerent_ has joined #rust-embedded
emerent_ is now known as emerent
emerent is now known as Guest3055
Guest3055 has quit [Ping timeout: 252 seconds]