I am trying to run the Adafruit microphone with the Nvidia Nx using the I2S0 interface that is exposed on the 40 pin connector:
Currently, I have the following pins connected on the 40 pin connector to the Adafruit board:
1- 3.3V
6- GND
12- BCLK
40- DOUT
35- LRCK
17- SEL/GND
I first enabled the I2S0 interface using the following commands:
I then reboot and disconnect the microphone and connect my Adafruit speaker board(Running Adafruit I2S 3W Stereo Speaker Bonnet with the Nvidia Nx - #4 by ocampo) to I2S0. The speaker works properly when I test other sounds, but when I try to play the test.wav file that I recorder with the microphone there is no sound. Is there a step that I missed?
Please connect the DOUT of the Adafruit board to the DIN on the Jetson which is pin-38 and not pin-40. Also if you refer to the MEMS Mic datasheet on the Adafruit website, you will find that it does not support 16-bit samples and so you should use "-f S32_LE’ instead.
Thanks for your answer, but unfortunately it is still not working. I connected the microphone as you specified, with the DOUT of the Adafruit board connected to the DIN of the NX (pin 38) and I changed S16_LE to S32_LE, but I still do not get anything from the microphone. I also tried changing the frequency to 16000 instead of 44100 since that is what Adafruit uses on their example code, but nothing seems to work. I also tried setting the SEL pin to both GND and 3.3V, which also did not work. Also, if I go to the sound settings and select input, I expect the input level to change when noise is generated, but it does not do that.
Is there something else that I may be missing?
Thank you!
$ sudo /opt/nvidia/jetson-io/config-by-function.py -l enabled
The following functions are enabled on the 40-pin header:
i2s5
I was able to probe the I2S pins and this is what I found when I ran an arecord command:
DOUT on the Adafruit board is sending data.
BCLK on the Adafruit board is 2.8MHz.
LRCL on the Adafruit board is 44MHz.
Again, I tried recording a wav file, but there were no sounds in the file. Maybe I just have a bad Adafruit board?