thank you for your reply. Unfortunately I live in Iran and I can't go to TI
website.
That is going to be a problem. Since the documents are copy-righted no
one can legally redistribute them, even if TI doesn't require registration
for them (I know I've had to go through a set of security questions to get
approval to download some stuff from TI).
I wanna get the audio with 6 ADMP401 microphones and a BBB.
Are you talking raw chips or something on a carrier like
I would point out that on the break-out,
https://learn.sparkfun.com/tutorials/mems-microphone-hookup-guide#arduino-software-example
the /idle/ output is already half of Vcc -- 1.6V -- and the BBB ADC maxes
out at 1.8V. You'll need an analog level shifter (op-amp perhaps, or a
potentially power-draining resistor voltage divider network) to change 0.0
- 3.3V => 0.0 - 1.8V.
I couldn't go to the TI website and couldn't find proper documents on other
sites.
so I don't know how to work with PRU and ADC.
I don't see anything obvious in the TRM about the PRU having access to
analog data. It has access to the eCAP but I think that mostly provides
timing for digital event capture. Most of the ADC mentions seems to be part
of the TSC_ADC_SS (touch screen controller - analog digital converter -
subsystem).
It does have the ability to set an "interrupt" pin for the PRU (PRU
does not have true interrupt -- the code must poll the pin to detect a
change and branch based on it). Don't know if the PRU can access the
sampled data.
Sampled data is stored in FIFOs which can be handled by DMA or by the
(the ARM processor, not the PRU?) CPU.
The easiest starting point is likely Python
but I suspect that won't be fast enough for capturing audio. Detecting
audio, yes, but recording it... doubtful.
Heck -- based upon
https://e2e.ti.com/support/legacy_forums/embedded/starterware/f/790/t/392567?Test-ADC-Sample-rate-with-the-BeagleBone-Black-3359-processor-
"""
The AM335x has a single ADC with 8 input analog multiplexer. The maximum
sample rate of the ADC is 200 kSPS. So if you need to sample 4 inputs for
each sequence of the FSM, the maximum sample rate of each of these 4 inputs
would be 50 kSPS.
"""
So even if you program it at the register level, six inputs means a
maximum sample rate per input is only 33.3k -- or 0.75% of CD audio
(44.1k).
might have some applicability though they are quite old...
Most examples use the sysfs form to access the ADC values -- I don't
find any examples actually programming the low-level ADC registers
directly.
http://theduchy.ualr.edu/?p=962 Ah -- this one actually does mention using
the PRU. Unfortunatly -- the author never provided the code, and one needs
the TRM to figure out where the step config registers are addressed.
It is mentioned that the OS set-up for ADC is configured for 16x
averaging -- that's going to cut the 33.3k per channel down to just over
2k.