ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
creich has quit [Quit: Leaving]
<re_irc> <the tab openoor (spookyvision@{github,cohost})> I'll test with rp2040, maybe it's something stm32 related
<re_irc> <the tab openoor (spookyvision@{github,cohost})> indeed, at least the "rust-dap" probe's uart shows up
IlPalazzo-ojiisa has quit [Quit: Leaving.]
causal has joined #rust-embedded
starblue has quit [Ping timeout: 268 seconds]
starblue has joined #rust-embedded
dc740 has joined #rust-embedded
mammothbane has joined #rust-embedded
mammothbane has quit [Quit: WeeChat 3.3]
dc740 has quit [Remote host closed the connection]
IlPalazzo-ojiisa has joined #rust-embedded
ni has quit [Quit: WeeChat 3.0]
ni has joined #rust-embedded
ni has quit [Client Quit]
ni has joined #rust-embedded
dc740 has joined #rust-embedded
conplan has quit [Remote host closed the connection]
conplan has joined #rust-embedded
<re_irc> <Stephen D> Hello! I'm trying to sample the ADC at a predictable rate. My thinking is I'd set up a timer running at my sample rate which the ADC would use as a trigger. The ADC uses DMA and would trigger an interrupt when full. I have the timer working properly but my DMA interrupt is never firing. I'm hoping I'm missing something simple. I'm on STM32F411. Here's the relevant code:
<re_irc> fn setup_timer(clocks: &Clocks, tim1: pac::TIM1, debug_pin: PA8) {
<re_irc> let debug_pin = debug_pin.into_alternate();
<re_irc> let mut pwm = tim1.pwm_hz(debug_pin, SAMPLE_RATE.Hz(), clocks).split();
<re_irc> <Nitin> Hi,
<re_irc> I've created the GPIO interrupt program using device pac. When interrupt fires it doesn't execute the corresponding interrupt handler nor gives any error. It goes to wfi() waiting for interrupt.
<re_irc> Looking for some inputs. Attached the code below
<re_irc> <Stephen D> Sorry for the disjoint blocks - I've moved all the code from a few places. I'm hoping there's a relatively obvious configuration error I've made, otherwise I'll put the full code on git
<re_irc> < (@ryan-summers:matrix.org)> Are you sure that the transfer complete ISR is actually firing? Those ISRs can be somewhat finicky and the DMA might be in e.g. infinite transfer mode
<re_irc> < (@ryan-summers:matrix.org)> Without delving further, all I can do is point you at our external ADC/DAC via SPI DMA+timer powered implementation for stabilizer, which is done on an STM32H7: https://github.com/quartiq/stabilizer/blob/master/src/hardware/adc.rs
<re_irc> < (@firefrommoonlight:matrix.org)> I don't know exactly what's wrong and am phone typing, but your approach is right
<re_irc> < (@firefrommoonlight:matrix.org)> I think perhaps instead of a CC channel on a normal timer, try using a basic timer; ADC and DAC triggering like this is their purpose
<re_irc> < (@firefrommoonlight:matrix.org)> Ie tim6/7. Might help eliminate some timer config while troubleshooting
<re_irc> < (@firefrommoonlight:matrix.org)> You may need to set the timer's update mode to Trigger
<re_irc> < (@firefrommoonlight:matrix.org)> Ie, And not configure it for PWM/output compare
<re_irc> < (@firefrommoonlight:matrix.org)> And depending on your use, you may want circular DMA
<re_irc> < (@firefrommoonlight:matrix.org)> (*On basic timers, you configure their master mode to Update; other timers so it a diff way; QC what that is)
<re_irc> < (@firefrommoonlight:matrix.org)> * do
emerent has quit [Ping timeout: 252 seconds]
emerent has joined #rust-embedded
dc740 has quit [Remote host closed the connection]
<re_irc> <bythemachine> Hi all. I asked this on discord #wg-embedded and was referred here: I'm looking into using rust embedded for validated module programs (common criteria etc...). Are there any IT security/compliance folk in the WG or is there another WG I should yeet myself into?