Tool/software:
Hello,
My CODEC interfaces to an MCU and the MCU is also connected to a modem. On the CODEC, I have a PDM microphone.
The MCU outputs a 128kHz PWM to the CODEC's BCLK and in return, the CODEC outputs an 8kHz WCLK. This makes that I have 8-bit 8kHz audio.
I now want to have 16-bit 16kHz audio. So I increased the BCLK to 256kHz and the CODEC returns 16kHz. However, as much as the audio does appear to sound of better quality / clearer, it is suuuuper slow.
Using the AIC software to show me the proper values, I changed MDAC/MADC (P0_R12/P0_R19) from 0x8C to 0x86 and that's what returns a 16kHz WCLK.
For the rest, the MCU is sending it a 3.072MHz clock to MCLK input. Then I have PLL enabled with R=3, J=40 and P=2. Using the AIC software, it shows a 184.32MHz CODEC_CLKIN under the "CODEC CLOCK / PLL" tab and then under the "Dividers" tab, NDAC/NADC are se to 15, MDAC/MADC are set to 12, DOSR/AOSR set to 128. All this shows ADC_CLK 12.288MHz;
- When using 8-bit 8kHz, ADC_MOD_CLK shows as 1024kHz and ADC_FS of 8kHz; < This works perfectly fine but low quality
- When using 16-bit 16kHz, ADC_MOD_CLK shows as 2048KHz for ADC_FS of 16KHz; < This sounds like higher quality but suuuuuuper slow audio
Here's the configuration for the 16-bit 16kHz audio (8bit 8kHz is pretty much the same except for the registers indicated above):
PAGE0:
Register 000: 000 (0x00 --> 0000 0000)
Register 001: 000 (0x00 --> 0000 0000)
Register 002: 096 (0x60 --> 0110 0000)
Register 003: 000 (0x00 --> 0000 0000)
Register 004: 003 (0x03 --> 0000 0011)
Register 005: 163 (0xA3 --> 1010 0011)
Register 006: 040 (0x28 --> 0010 1000)
Register 007: 000 (0x00 --> 0000 0000)
Register 008: 000 (0x00 --> 0000 0000)
Register 009: 000 (0x00 --> 0000 0000)
Register 010: 000 (0x00 --> 0000 0000)
Register 011: 143 (0x8F --> 1000 1111)
Register 012: 134 (0x86 --> 1000 0110)
Register 013: 000 (0x00 --> 0000 0000)
Register 014: 128 (0x80 --> 1000 0000)
Register 015: 002 (0x02 --> 0000 0010)
Register 016: 000 (0x00 --> 0000 0000)
Register 017: 008 (0x08 --> 0000 1000)
Register 018: 143 (0x8F --> 1000 1111)
Register 019: 134 (0x86 --> 1000 0110)
Register 020: 128 (0x80 --> 1000 0000)
Register 021: 001 (0x01 --> 0000 0001)
Register 022: 000 (0x00 --> 0000 0000)
Register 023: 004 (0x04 --> 0000 0100)
Register 024: 000 (0x00 --> 0000 0000)
Register 025: 000 (0x00 --> 0000 0000)
Register 026: 001 (0x01 --> 0000 0001)
Register 027: 132 (0x84 --> 1000 0100)
Register 028: 000 (0x00 --> 0000 0000)
Register 029: 000 (0x00 --> 0000 0000)
Register 030: 001 (0x01 --> 0000 0001)
Register 031: 000 (0x00 --> 0000 0000)
Register 032: 000 (0x00 --> 0000 0000)
Register 033: 000 (0x00 --> 0000 0000)
Register 034: 000 (0x00 --> 0000 0000)
Register 035: 000 (0x00 --> 0000 0000)
Register 036: 196 (0xC4 --> 1100 0100)
Register 037: 102 (0x66 --> 0110 0110)
Register 038: 000 (0x00 --> 0000 0000)
Register 039: 000 (0x00 --> 0000 0000)
Register 040: 000 (0x00 --> 0000 0000)
Register 041: 000 (0x00 --> 0000 0000)
Register 042: 014 (0x0E --> 0000 1110)
Register 043: 000 (0x00 --> 0000 0000)
Register 044: 000 (0x00 --> 0000 0000)
Register 045: 000 (0x00 --> 0000 0000)
Register 046: 000 (0x00 --> 0000 0000)
Register 047: 000 (0x00 --> 0000 0000)
Register 048: 000 (0x00 --> 0000 0000)
Register 049: 000 (0x00 --> 0000 0000)
Register 050: 000 (0x00 --> 0000 0000)
Register 051: 000 (0x00 --> 0000 0000)
Register 052: 000 (0x00 --> 0000 0000)
Register 053: 018 (0x12 --> 0001 0010)
Register 054: 002 (0x02 --> 0000 0010)
Register 055: 014 (0x0E --> 0000 1110)
Register 056: 002 (0x02 --> 0000 0010)
Register 057: 000 (0x00 --> 0000 0000)
Register 058: 000 (0x00 --> 0000 0000)
Register 059: 000 (0x00 --> 0000 0000)
Register 060: 001 (0x01 --> 0000 0001)
Register 061: 007 (0x07 --> 0000 0111)
Register 062: 000 (0x00 --> 0000 0000)
Register 063: 020 (0x14 --> 0001 0100)
Register 064: 012 (0x0C --> 0000 1100)
Register 065: 000 (0x00 --> 0000 0000)
Register 066: 000 (0x00 --> 0000 0000)
Register 067: 000 (0x00 --> 0000 0000)
Register 068: 111 (0x6F --> 0110 1111)
Register 069: 056 (0x38 --> 0011 1000)
Register 070: 000 (0x00 --> 0000 0000)
Register 071: 000 (0x00 --> 0000 0000)
Register 072: 000 (0x00 --> 0000 0000)
Register 073: 000 (0x00 --> 0000 0000)
Register 074: 000 (0x00 --> 0000 0000)
Register 075: 238 (0xEE --> 1110 1110)
Register 076: 016 (0x10 --> 0001 0000)
Register 077: 216 (0xD8 --> 1101 1000)
Register 078: 126 (0x7E --> 0111 1110)
Register 079: 227 (0xE3 --> 1110 0011)
Register 080: 000 (0x00 --> 0000 0000)
Register 081: 232 (0xE8 --> 1110 1000)
Register 082: 000 (0x00 --> 0000 0000)
Register 083: 030 (0x1E --> 0001 1110)
Register 084: 030 (0x1E --> 0001 1110)
Register 085: 000 (0x00 --> 0000 0000)
Register 086: 064 (0x40 --> 0100 0000)
Register 087: 192 (0xC0 --> 1100 0000)
Register 088: 038 (0x26 --> 0010 0110)
Register 089: 000 (0x00 --> 0000 0000)
Register 090: 016 (0x10 --> 0001 0000)
Register 091: 000 (0x00 --> 0000 0000)
Register 092: 000 (0x00 --> 0000 0000)
Register 093: 000 (0x00 --> 0000 0000)
Register 094: 000 (0x00 --> 0000 0000)
Register 095: 000 (0x00 --> 0000 0000)
Register 096: 127 (0x7F --> 0111 1111)
** Past register 127, all values are 0.
PAGE 1:
Register 000: 001 (0x01 --> 0000 0001)
Register 001: 000 (0x00 --> 0000 0000)
Register 002: 000 (0x00 --> 0000 0000)
Register 003: 000 (0x00 --> 0000 0000)
Register 004: 000 (0x00 --> 0000 0000)
Register 005: 000 (0x00 --> 0000 0000)
Register 006: 000 (0x00 --> 0000 0000)
Register 007: 000 (0x00 --> 0000 0000)
Register 008: 000 (0x00 --> 0000 0000)
Register 009: 060 (0x3C --> 0011 1100)
Register 010: 000 (0x00 --> 0000 0000)
Register 011: 016 (0x10 --> 0001 0000)
Register 012: 008 (0x08 --> 0000 1000)
Register 013: 008 (0x08 --> 0000 1000)
Register 014: 000 (0x00 --> 0000 0000)
Register 015: 000 (0x00 --> 0000 0000)
Register 016: 006 (0x06 --> 0000 0110)
Register 017: 006 (0x06 --> 0000 0110)
Register 018: 064 (0x40 --> 0100 0000)
Register 019: 064 (0x40 --> 0100 0000)
Register 020: 000 (0x00 --> 0000 0000)
Register 021: 000 (0x00 --> 0000 0000)
Register 022: 000 (0x00 --> 0000 0000)
Register 023: 000 (0x00 --> 0000 0000)
Register 024: 000 (0x00 --> 0000 0000)
Register 025: 000 (0x00 --> 0000 0000)
Register 026: 000 (0x00 --> 0000 0000)
Register 027: 000 (0x00 --> 0000 0000)
Register 028: 000 (0x00 --> 0000 0000)
Register 029: 000 (0x00 --> 0000 0000)
Register 030: 000 (0x00 --> 0000 0000)
Register 031: 000 (0x00 --> 0000 0000)
Register 032: 000 (0x00 --> 0000 0000)
Register 033: 000 (0x00 --> 0000 0000)
Register 034: 000 (0x00 --> 0000 0000)
Register 035: 000 (0x00 --> 0000 0000)
Register 036: 000 (0x00 --> 0000 0000)
Register 037: 000 (0x00 --> 0000 0000)
Register 038: 000 (0x00 --> 0000 0000)
Register 039: 000 (0x00 --> 0000 0000)
Register 040: 000 (0x00 --> 0000 0000)
Register 041: 000 (0x00 --> 0000 0000)
Register 042: 000 (0x00 --> 0000 0000)
Register 043: 000 (0x00 --> 0000 0000)
Register 044: 000 (0x00 --> 0000 0000)
Register 045: 000 (0x00 --> 0000 0000)
Register 046: 000 (0x00 --> 0000 0000)
Register 047: 000 (0x00 --> 0000 0000)
Register 048: 000 (0x00 --> 0000 0000)
Register 049: 000 (0x00 --> 0000 0000)
Register 050: 000 (0x00 --> 0000 0000)
Register 051: 104 (0x68 --> 0110 1000)
Register 052: 064 (0x40 --> 0100 0000)
Register 053: 000 (0x00 --> 0000 0000)
Register 054: 064 (0x40 --> 0100 0000)
Register 055: 000 (0x00 --> 0000 0000)
Register 056: 000 (0x00 --> 0000 0000)
Register 057: 000 (0x00 --> 0000 0000)
Register 058: 000 (0x00 --> 0000 0000)
Register 059: 040 (0x28 --> 0010 1000)
Register 060: 040 (0x28 --> 0010 1000)
Register 061: 000 (0x00 --> 0000 0000)
Register 062: 000 (0x00 --> 0000 0000)
Register 063: 192 (0xC0 --> 1100 0000)
**Past register 64, all values are 0.
Thanks!
Ben
[EDIT] Is is possible that if I leave the WCLK as 8kHz but increase the BLCK to 256kHz, I will have 16-bits of data?