Replies: 1 comment
-
@arjndr The issue lies in the following piece of code where the execution time of read_mic_sample, write_sample, and even k_sleep accumulates, resulting in a recording that is only 2 seconds long instead of the intended 10 seconds.
Just an idea, though not the actual solution: Instead of using k_sleep and k_uptime_get() to check for expiration, the read_mic_sample function should be called using a timer, as described in the Zephyr timer documentation, and signal a semaphore to the main thread to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to record samples from an analog microphone module (MAX9814) using ADC, it kinda works but the audio is only 2 seconds long instead of 10 and it sounds way too sped up. I basically "ported" the code for waveform I found in this page showing how to make wav files in C.
P.S: I'm using the Seeed XIAO nRF52840 board
Here's the code:
Here's my DTS:
Beta Was this translation helpful? Give feedback.
All reactions