RT685 i2s3-RX-DMA BCLK No clock signal

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

RT685 i2s3-RX-DMA BCLK No clock signal

642 次查看
Padi-2023
Contributor III

rt685 tried to drive I2S3, found that only WS signal output, no BCLK signal output!
Here is the code:
1、
CLOCK_AttachClk(kAUDIO_PLL_to_FLEXCOMM3);
2、

const uint32_t port0_pin21_config = (/* Pin is configured as FC3_SCK */
                                        IOPCTL_PIO_FUNC1 |
                                        /* Disable pull-up / pull-down function */
                                        IOPCTL_PIO_PUPD_DI |
                                        /* Enable pull-down function */
                                        IOPCTL_PIO_PULLDOWN_EN |
                                        /* Disable input buffer function */
                                        IOPCTL_PIO_INBUF_DI |
                                        /* Normal mode */
                                        IOPCTL_PIO_SLEW_RATE_NORMAL |
                                        /* Normal drive */
                                        IOPCTL_PIO_FULLDRIVE_DI |
                                        /* Analog mux is disabled */
                                        IOPCTL_PIO_ANAMUX_DI |
                                        /* Pseudo Output Drain is disabled */
                                        IOPCTL_PIO_PSEDRAIN_DI |
                                        /* Input function is not inverted */
                                        IOPCTL_PIO_INV_DI);
    /* PORT0 PIN21 (coords: C7) is configured as FC3_SCK */
    IOPCTL_PinMuxSet(IOPCTL, 0U, 21U, port0_pin21_config); //I2S3 BCLK
 
    const uint32_t port0_pin22_config = (/* Pin is configured as FC3_TXD_SCL_MISO_WS */
                                        IOPCTL_PIO_FUNC1 |
                                        /* Disable pull-up / pull-down function */
                                        IOPCTL_PIO_PUPD_DI |
                                        /* Enable pull-down function */
                                        IOPCTL_PIO_PULLDOWN_EN |
                                        /* Enables input buffer function */
                                        IOPCTL_PIO_INBUF_DI |
                                        /* Normal mode */
                                        IOPCTL_PIO_SLEW_RATE_NORMAL |
                                        /* Normal drive */
                                        IOPCTL_PIO_FULLDRIVE_DI |
                                        /* Analog mux is disabled */
                                        IOPCTL_PIO_ANAMUX_DI |
                                        /* Pseudo Output Drain is disabled */
                                        IOPCTL_PIO_PSEDRAIN_DI |
                                        /* Input function is not inverted */
                                        IOPCTL_PIO_INV_DI);
    /* PORT0 PIN22 (coords: D8) is configured as FC3_TXD_SCL_MISO_WS */
    IOPCTL_PinMuxSet(IOPCTL, 0U, 22U, port0_pin22_config); //I2S3 WS
 
const uint32_t port0_pin23_config = (/* Pin is configured as FC3_RXD_SDA_MOSI_DATA */
                                         IOPCTL_PIO_FUNC1 |
                                         /* Disable pull-up / pull-down function */
                                         IOPCTL_PIO_PUPD_DI |
                                         /* Enable pull-down function */
                                         IOPCTL_PIO_PULLDOWN_EN |
                                         /* Enables input buffer function */
                                         IOPCTL_PIO_INBUF_DI |
                                         /* Normal mode */
                                         IOPCTL_PIO_SLEW_RATE_NORMAL |
                                         /* Full drive enable */
                                         IOPCTL_PIO_FULLDRIVE_DI  |
                                         /* Analog mux is disabled */
                                         IOPCTL_PIO_ANAMUX_DI |
                                         /* Pseudo Output Drain is disabled */
                                         IOPCTL_PIO_PSEDRAIN_DI |
                                         /* Input function is not inverted */
                                         IOPCTL_PIO_INV_DI);
    /* PORT0 PIN23 (coords: C9) is configured as FC3_RXD_SDA_MOSI_DATA */
    IOPCTL_PinMuxSet(IOPCTL, 0U, 23U, port0_pin23_config); //I2S3 SDA RX
3、
DMA_EnableChannel(AUDIO_CODEC_DMA , AUDIO_CODEC_I2S_RX_CHANNEL);
DMA_SetChannelPriority(AUDIO_CODEC_DMA , AUDIO_CODEC_I2S_RX_CHANNEL, kDMA_ChannelPriority2);
DMA_CreateHandle(&s_Audio_CodecDmaRxHandle, AUDIO_CODEC_DMA, AUDIO_CODEC_I2S_RX_CHANNEL);
 
I2S_RxGetDefaultConfig(&s_Audio_CodecRxConfig);
 
/**************AUX I2S RX***********************/
s_Audio_CodecRxConfig.divider = AUDIO_CODEC_I2S_CLOCK_DIVIDER;
s_Audio_CodecRxConfig.masterSlave = AUDIO_CODEC_I2S_RX_MODE;
//s_Audio_CodecRxConfig.oneChannel  = true; //mono
s_Audio_CodecRxConfig.leftJust    = true;
s_Audio_CodecRxConfig.frameLength = 64U;
I2S_RxInit(AUDIO_CODEC_I2S_RX, &s_Audio_CodecRxConfig);
 
/*********AUX I2S RX data buff Config**********/
s_Audio_CodecRxTransfer.data = &s_Audio_CodecBuffer[0];
s_Audio_CodecRxTransfer.dataSize = sizeof(s_Audio_CodecBuffer);
 
I2S_RxTransferCreateHandleDMA(AUDIO_CODEC_I2S_RX, &s_Audio_CodecRxHandle, &s_Audio_CodecDmaRxHandle, Audio_CodecRxCallback, (void *)&s_Audio_CodecRxTransfer);
 
I2S_RxTransferReceiveDMA(AUDIO_CODEC_I2S_RX, &s_Audio_CodecRxHandle, s_Audio_CodecRxTransfer);
    I2S_RxTransferReceiveDMA(AUDIO_CODEC_I2S_RX, &s_Audio_CodecRxHandle, s_Audio_CodecRxTransfer);
0 项奖励
回复
5 回复数

628 次查看
Padi-2023
Contributor III

CODEC  MAX98091 SCH screenshot1710210202319.png

0 项奖励
回复

630 次查看
Padi-2023
Contributor III

1710208189425.png
This is the waveform collected by the logic analyzer

0 项奖励
回复

640 次查看
Padi-2023
Contributor III

/* Set flexcomm3 SCK, WS from shared signal set 0 */
SYSCTL1->FCCTRLSEL[3] = SYSCTL1_FCCTRLSEL_SCKINSEL(1) | SYSCTL1_FCCTRLSEL_WSINSEL(1);

0 项奖励
回复

640 次查看
Padi-2023
Contributor III

#define AUDIO_CODEC_SAMPLE_RATE (32000)

#define AUDIO_CODEC_I2S_MASTER_CLOCK_FREQUENCY CLOCK_GetMclkClkFreq()
#define AUDIO_CODEC_I2S_RX (I2S3)
#define AUDIO_CODEC_DMA (DMA0)

#define AUDIO_CODEC_I2S_RX_CHANNEL (6)

#define AUDIO_CODEC_I2S_CLOCK_DIVIDER (24576000U / AMP_AUDIO_SAMPLE_RATE / 32U / 2)#define AUDIO_CODEC_I2S_RX_MODE kI2S_MasterSlaveNormalMaster //kI2S_MasterSlaveNormalSlave

0 项奖励
回复

492 次查看
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @Padi-2023 ,

 

How did you set up the following register?

Kan_Li_0-1712136487650.png

I am wondering if you configure SCK to be driven externally.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 项奖励
回复