<re_irc> <@gdamjan:spodeli.org> k900:0upti.me: wow, they have a rick roll video linked 🤦
neceve has quit [Ping timeout: 256 seconds]
jackneilll has joined #rust-embedded
jackneillll has quit [Ping timeout: 245 seconds]
PyroPeter has quit [Ping timeout: 240 seconds]
PyroPeter has joined #rust-embedded
Blitzedm is now known as edm
neceve has joined #rust-embedded
neceve has quit [Ping timeout: 256 seconds]
neceve has joined #rust-embedded
<re_irc> <@firefrommoonlight:matrix.org> Trip report: KiCad 0.6 is a more polished experience across the board
<re_irc> <@firefrommoonlight:matrix.org> This is peak OSS
<re_irc> <@gh_alexander89:matrix.org> Hi, I have a very time critical application. In this, I have to receive 1 byte from 4 different UART peripherals. Currently I'm struggling to decide if I should use DMA or poll (read) them frequently.
<re_irc> <@gh_alexander89:matrix.org> Can somebody tell me, what has more overhead and what would be the better solution.
<re_irc> <@gh_alexander89:matrix.org> A. Using a DMA Cycle buffer
<re_irc> <@gh_alexander89:matrix.org> B. Read and ignore WouldBreak
<re_irc> <@k900:0upti.me> How time critical are we talking?
<re_irc> <@firefrommoonlight:matrix.org> DMA
<re_irc> <@firefrommoonlight:matrix.org> As a default
<re_irc> <@firefrommoonlight:matrix.org> Actually, if only 4 bytes, probably not a big deal
<re_irc> <@firefrommoonlight:matrix.org> The DMA buffer would fill up so fast, I'm not sure if it would make much of a diff
<re_irc> <@newam:matrix.org> firefrommoonlight:matrix.org: Yeah I'm using it too, it is pretty great.
<re_irc> <@firefrommoonlight:matrix.org> Ie, you'd have 4 1-byte DMA buffers, so I guess DMA maybe isn't the right answer
<re_irc> <@gh_alexander89:matrix.org> I use the time different in the cycles to calculate the speed of something. I don't use the UART for this, but I could not block the main loop to read data
<re_irc> <@firefrommoonlight:matrix.org> unless the data comes in sporadically?
<re_irc> <@k900:0upti.me> That sounds like you should use interrupts
<re_irc> <@firefrommoonlight:matrix.org> Overall: Need more info to comment
<re_irc> <@k900:0upti.me> And possibly not even read the data if you just care about the timings
<re_irc> <@gh_alexander89:matrix.org> firefrommoonlight:matrix.org: The incomming data are not in a fixed frequency
<re_irc> <@firefrommoonlight:matrix.org> If I understand correctly (not sure I do), I agree with K900
<re_irc> <@firefrommoonlight:matrix.org> You'd have 4 UART interrupts; one for each periph. Handle your timing logic in their ISRs
<re_irc> <@gh_alexander89:matrix.org> I just need the value. The timing I measure is independent of the incomming data.
<re_irc> <@k900:0upti.me> You just said the exact opposite thing
<re_irc> <@firefrommoonlight:matrix.org> Yea, just use interrupts. Read the data reg from each of 4 ISRs
<re_irc> <@gh_alexander89:matrix.org> Sorry 🤣
<re_irc> <@gh_alexander89:matrix.org> Thanks, to you all!
<re_irc> <@gh_alexander89:matrix.org> firefrommoonlight:matrix.org: Sounds promising. I will give it a shot.
<re_irc> <@firefrommoonlight:matrix.org> DMA is more useful when processing multiple words
<re_irc> <@firefrommoonlight:matrix.org> Since it allows your CPU to do other things while the peripheral processes the incoming or outgoing data
<re_irc> <@gh_alexander89:matrix.org> firefrommoonlight:matrix.org: I recognized that as well. That why I'm here.
<re_irc> <@gh_alexander89:matrix.org> I will rewrite my display driver to DMA but this one byte thing was a bit a overkill...
Socke has quit [Quit: WeeChat 3.3]
Socke has joined #rust-embedded
<re_irc> <@thejpster:matrix.org> Having GHA troubles today. It seems to get stuck on "Updating crates.io index". Had one stuck for an hour.
Socke has quit [Ping timeout: 250 seconds]
Socke has joined #rust-embedded