DA7212 Digital Microphone

8 posts / 0 new
Last post
Brools
Offline
Last seen:2 years 9 months ago
Joined:2018-05-03 10:20
DA7212 Digital Microphone

Hi

I need to use the digital microphone as input and output it on I2S, but I am failing to do so.
The codec does not seem to generate any clock for the microphone.
I am running of the PLL (working as intended as I can see it affect my I2S frequency).

I have managed to get the aux input -> I2S working, but cannot figure this digital microphone out.

BR
Andreas Krebs

Device:
ED_Dialog
Offline
Last seen:5 hours 44 min ago
Staff
Joined:2017-09-18 11:54
Hello Andreas,

Hello Andreas,

I will look into this for you. Could you supply me with the script/Code you are using? And you’re clock frequencies?

Could you also confirm your setup, you are trying to use the AUX input and a microphone as an output? or do you mean speaker?

Kind regards,
Elliott Dexter

Brools
Offline
Last seen:2 years 9 months ago
Joined:2018-05-03 10:20
Hi Elliott

Hi Elliott

Thank you for your response.

The audio path/setup thatI would like to have:
(INPUT) Digital Microphone -> I2S (OUTPUT, to another chip)

How I imagine the path (but could be something else):
(INPUT) Digital Microphone -> ADC filters -> Digital Audio Interface -> I2S (OUTPUT)

Clock configurations:
The MCLK that I supply is 15 MHz.
PLL_FRAC_TOP = 0x06
PLL_FRAC_BOT = 0xDC
PLL_INTEGER = 0x1A
PLL CTRL = 0x84

I have uploaded a part of my code - hopefully it also makes some sense to you.
Again, thanks for any help you can give me.

Attachment:
ED_Dialog
Offline
Last seen:5 hours 44 min ago
Staff
Joined:2017-09-18 11:54
Hi Andreas,

Hi Andreas,

We have spotted in the script you sent us that you dont have anything that enables MICBIAS1, this is required to output the clocks you are missing for the DMIC.

The datasheet says:

"MICBIAS1 can be used to power the digtal microphone, but it must be enabled becuase it is MICBIAS1 that supplies the digital microphone pins."

Does this make sense?

Kind regards,
Elliott Dexter

ED_Dialog
Offline
Last seen:5 hours 44 min ago
Staff
Joined:2017-09-18 11:54
Hello Andreas,

Hello Andreas,

I have attached a script to this post for guidance.

Kind regards,

Elliott Dexter

Attachment:
Brools
Offline
Last seen:2 years 9 months ago
Joined:2018-05-03 10:20
Thank you for your script - I

Thank you for your script - I now have a clock output to my digital microphone (and data back)!

However, I am running the DA7212 I2S in master mode, so I had to change it a little bit and I am not getting any output on the I2S data line (Frame and Bit clock are working).
I have tried to translate my code to your script format:

//Setup clocks and references
WRITE DA7212 0x23 0x08 //Enable Bias
WRITE DA7212 0x90 0xFF //Enable Digital LDO
WRITE DA7212 0x47 0xCD //Enable Charge Pump (fixed VDD/1)
WRITE DA7212 0x92 0x02 //Set Ramp rate to 1 second
WRITE DA7212 0x29 0xC0 //Enable AIF 16bit I2S mode
WRITE DA7212 0x28 0x80 //Master Mode
WRITE DA7212 0x22 0x05 //Set incoming sample rate to 16kHz
WRITE DA7212 0x62 0xAA //Enable MICBIAS 1 & 2
WRITE DA7212 0x21 0x10 //DIG Routing ADC
WRITE DA7212 0x24 0x06 //PLL_FRAC_TOP
WRITE DA7212 0x25 0xDC //PLL_FRAC_BOT
WRITE DA7212 0x20 0x1A //PLL_FBDIV_INT
WRITE DA7212 0x27 0x84 //MCLK 15MHz
WRITE DA7212 0x94 0x00 //PC_COUT_Resync

//Configure Inputs/Outputs
WRITE DA7212 0x32 0x80 /DMIC_L_EN
WRITE DA7212 0x33 0x80 //DMIC_R_EN
WRITE DA7212 0x65 0xA8 //Enable Left input mixer
WRITE DA7212 0x66 0xA8 //Enable right input mixer

Can you see why I am getting I2S Bit and Frame, but not any data?
I have attached a screenshot showing the lack of data.

Attachment:
ED_Dialog
Offline
Last seen:5 hours 44 min ago
Staff
Joined:2017-09-18 11:54
Hello Andreas,

Hello Andreas,

The ADCs need to be enabled:

WRITE DA7212 0x67 0x80 //ADC_L_CTRL

WRITE DA7212 0x68 0x80 //ADC_R_CTRL.

Try adding these commands. I have attached a scripted again for your referance.

kind regards,
Elliott Dexter

Brools
Offline
Last seen:2 years 9 months ago
Joined:2018-05-03 10:20
Thank you, that was exactly

Thank you, that was exactly what I needed.
Outstanding service :)

Topic locked