1

I was able to generate a signal using DAC periphery and a HAL_DELAY. I want to sample this signal using ADC by connecting DAC output to ADC input for FIR filter purposes. But there is a logical problem, because the code is sequential after generating DAC commands value I can sample with ADC commands but there will be only one DAC value to sample.

Is there a way to simultaneously generate signal with DAC and simultaneously sample it with ADC in STM32F407?

Null
  • 7,603
  • 17
  • 36
  • 48
ron398
  • 157
  • 1
  • 8
  • Are you using DMA? – Spehro Pefhany Mar 04 '21 at 19:40
  • No i am not using DMA I am manualy creating the DAC values. Is there a method to accomplish simultanios generation and sampling of a signal? Thanks. – ron398 Mar 04 '21 at 19:56
  • You can find examples of continuous FIR filtering using the CMSIS functions. You may have to ping-pong two ADC buffers rather than using circular buffers directly. – Spehro Pefhany Mar 04 '21 at 20:21
  • Hello Spehro,Could you please elaborate more on the PING PONG method on ADC's so i could imagine the proccess? Thanks. – ron398 Mar 04 '21 at 20:42
  • Use that as a search term along with CMSIS and Cortex-M4. I'm actually working on something similar as a project but don't have anything to share atm. – Spehro Pefhany Mar 04 '21 at 20:55
  • Hello Spero,COuld you please show the intuition of the method you suggest? How it allows simultanios generating of signal in DAC and sampling it with ADC simultaniosly? Thanks. – ron398 Mar 04 '21 at 21:57
  • ADC(DMA)->buffer1/2->(callback) FIR processing->buffer->DAC(DMA) – Spehro Pefhany Mar 04 '21 at 21:59
  • Hello Spehro,what is (callback) FIR processing? i tried to google it but no result for begginers. Could you help with some method material for begginers – ron398 Mar 05 '21 at 08:46
  • Try Phil's Lab on Youtube. – Spehro Pefhany Mar 05 '21 at 08:47

0 Answers0