cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_I2S_Receive_DMA(&hi2s5, i2s_resp[i2s_Rx_xnt], 4096)

SKris.1616
Associate II

Hi,

HAL_I2S_Receive_DMA(&hi2s5, i2s_resp[i2s_Rx_xnt], 4096) after executing this non blocking function I expect some data will be stored in the buffer but in my case nothing.

Can anyone help me with this?

Selected DMA configuration as circular mode and enabled FIFO with thresold as full.

Regards,

Suresh

12 REPLIES 12
SKris.1616
Associate II

RX call back functions also not getting executed. I have generated code using cubeMX.

Which STM32?

"Manual" (non-DMA) reception from the I2S works?

Read out and check content of relevant SPI/I2S and DMA registers.

JW

STM32f411CE board.

I have tried it normal I2S HAL_I2S_RECEIVE() -> This is working fine.

Regards,

Suresh.

Hi. Show declaration of  i2s_resp.

Hi,

int16_t i2s_Resp[I2S_READ_BUF_NUM][I2S_READ_SAMPLES];

//int16_t i2s_Resp[4][4096];

DMA is enabled properly and after the function call (HAL_i2S_Receive_DMA()) response is HAL_OK.

But I don't see any of the callbacks with respect to DMA is getting triggered.

Regards,

Suresh.

Show DMA initialization? DMA interrupts is enabled?

SKris.1616
Associate II

Hi,

I have attached screen shot of DMA settings.

DMA2 stream3 global interrupt is by default enabled. Do i need to call any function explicitly in my main?

Actually i have defined the call back functions in my code as it is a weak declaration in the HAL.

Like below:

void HAL_I2S_RxCpltCallback(I2S_HandleTypeDef *hi2s)

{

HAL_Delay(10);

}

void HAL_I2S_RxHalfCpltCallback(I2S_HandleTypeDef *hi2s)

{

HAL_Delay(10);

}

Reagrds,

Suresh.

Show "NVIC Settings" tab.

Hi,

Attached NVIC settings.

Regards,

Suresh.