Skip to main content
rrach
Associate II
February 16, 2019
Question

Receiving and storing the sample values

  • February 16, 2019
  • 2 replies
  • 669 views

I am using the STM32F4 Board and Wolfson pi audio card for my problem, which I stated down. I am trying to pass my own sample values to the DAC, then passing out them through the speaker. Then I want to capture/sense those values (emitted signals from the speaker) by using the MEMS microphone present on the audio card.

This is similar to audio passthrough example provided by ARM, in which our voice will be sensed by the MEMS microphone and then the same will be emitted by the speaker. The only change I want is to pass and operate on my own sample values generated from the code.

I am able to send my values through the speaker, but I am not understanding how to do capture those signal again. I am doing sample-based processing. So ideally, one sample will be sent out and again it will be sensed by the MEMS microphone.

So is this possible by using interrupt methods instead of DMA / polling? If possible, how I can do that? If not, why?

    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    February 16, 2019

    Many things are possible.

    You want to be careful not to get stuck in linear/serialized mindset where you are blocking execution. IRQ and DMA driven buffers can avoid some of the unnecessary waiting for things to happen in sequence.

    The ADC needs DMA if multiple channels are involved, but it also works well when triggered by a pacing timer, similarly the DAC.

    Sorry not familiar with the Wolfson PI card. Would recommend you look at examples implementing portions of the project with a mind to how they would come together and integrate into something more complex.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    rrach
    rrachAuthor
    Associate II
    February 26, 2019

    Ok. Thank you.