Hi Sir,
I am using one of your module nrf52832. I am facing problem on the sound generated on I2S interface.
I am sending byte array of audio from I2S of NRF52832 to MAX98357A audio amplifier. There is no actual clear sound. The connection are as follows.
NRF52832 | Amplifier |
VDD | Vin |
GND | GND |
N/A | SD |
GND | Gain (100K ) |
SDOUT (16) | Din |
SCLK (17) | BCLK |
LRCK (14) | LRC |
Configuration of Audio file :
Frequency : 16000 Hz, 16-Bit, Mono
Configuration of NRF52832 :
NRF_I2S->CONFIG.TXEN=(I2S_CONFIG_TXEN_TXEN_ENABLE<<I2S_CONFIG_TXEN_TXEN_Pos);
NRF_I2S->CONFIG.MCKEN=(I2S_CONFIG_MCKEN_MCKEN_ENABLE<<I2S_CONFIG_MCKEN_MCKEN_Pos);
NRF_I2S->CONFIG.MCKFREQ=I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV63<<I2S_CONFIG_MCKFREQ_MCKFREQ_Pos;
NRF_I2S->CONFIG.RATIO=I2S_CONFIG_RATIO_RATIO_32X<<I2S_CONFIG_RATIO_RATIO_Pos;
NRF_I2S->CONFIG.MODE=I2S_CONFIG_MODE_MODE_MASTER<<I2S_CONFIG_MODE_MODE_Pos;
NRF_I2S->CONFIG.SWIDTH=I2S_CONFIG_SWIDTH_SWIDTH_16BIT<<I2S_CONFIG_SWIDTH_SWIDTH_Pos;
NRF_I2S->CONFIG.ALIGN=I2S_CONFIG_ALIGN_ALIGN_LEFT<<I2S_CONFIG_ALIGN_ALIGN_Pos;
NRF_I2S->CONFIG.FORMAT=I2S_CONFIG_FORMAT_FORMAT_I2S<<I2S_CONFIG_FORMAT_FORMAT_Pos;
NRF_I2S->CONFIG.CHANNELS=I2S_CONFIG_CHANNELS_CHANNELS_LEFT<<I2S_CONFIG_CHANNELS_CHANNELS_Pos;
NRF_I2S->PSEL.SCK=PIN_SCK<<I2S_PSEL_SCK_PIN_Pos;
NRF_I2S->PSEL.LRCK=PIN_LRCK<<I2S_PSEL_LRCK_PIN_Pos;
NRF_I2S->PSEL.SDOUT=PIN_SDOUT<<I2S_PSEL_SDOUT_PIN_Pos;
Please let me know if there is some HW/SW issue.
Thanks & Regards,
Brajesh Kumar Patra