Skip to main content
SKris.1616
Associate III
January 8, 2020
Question

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

  • January 8, 2020
  • 7 replies
  • 3644 views

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

This topic has been closed for replies.

7 replies

SKris.1616
Associate III
January 8, 2020

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

waclawek.jan
Super User
January 8, 2020

Which STM32?

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

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

JW

SKris.1616
Associate III
January 8, 2020

STM32f411CE board.

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

Regards,

Suresh.

oleksandr.karbivsky
Senior II
January 8, 2020

Hi. Show declaration of  i2s_resp.

SKris.1616
Associate III
January 8, 2020

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.

oleksandr.karbivsky
Senior II
January 8, 2020

Show DMA initialization? DMA interrupts is enabled?

SKris.1616
Associate III
January 8, 2020

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.

oleksandr.karbivsky
Senior II
January 8, 2020

Show "NVIC Settings" tab.

SKris.1616
Associate III
January 8, 2020

Hi,

Attached NVIC settings.

Regards,

Suresh.

oleksandr.karbivsky
Senior II
January 8, 2020

Check stm32f4xx_hal_i2s.c file. Put breakpoints on functions I2S_DMARxCplt and I2S_DMAError.

SKris.1616
Associate III
January 21, 2020

Any further suggestion on this question?

It will be helpful for me.

Regards,

Suresh