Skip to main content
SDall
Associate III
September 5, 2019
Solved

I2c receive with dma

  • September 5, 2019
  • 3 replies
  • 851 views

hi I looked for a tutorial on dma receive i2c but I didn't find it, I

tried with dma receive uart and it works perfectly:

int main(void)

{

HAL_Init();

 MX_GPIO_Init();

 MX_DMA_Init();

 MX_USART2_UART_Init();

 MX_USART6_UART_Init();

 /* USER CODE BEGIN 2 */

 HAL_UART_Receive_DMA(&huart6, (uint8_t *)rxBuf, 25);

 while (1)

 {

 }

}

void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)

{

HAL_UART_Receive_DMA(&huart6, (uint8_t *)rxBuf, 25);

     }

could I have an example like this with dma i2c with the callbak function?

TANKS

This topic has been closed for replies.
Best answer by After Forever

You didn't even mention your microcontroller model/series so it's not possible to pinpoint the exact location of example projects (anyway, is it really that hard to find in 11 days?).

Open your Cube repository directory (Help->Update Settings->Browse in CubeMX) and find the example projects in STM32Cube_FW_***_V***/Projects/***/Examples/I2C

Substitude ***-s with correct values.

3 replies

SDall
SDallAuthor
Associate III
September 16, 2019

please someone answer me!!!!!

After Forever
After ForeverBest answer
Senior III
September 16, 2019

You didn't even mention your microcontroller model/series so it's not possible to pinpoint the exact location of example projects (anyway, is it really that hard to find in 11 days?).

Open your Cube repository directory (Help->Update Settings->Browse in CubeMX) and find the example projects in STM32Cube_FW_***_V***/Projects/***/Examples/I2C

Substitude ***-s with correct values.

SDall
SDallAuthor
Associate III
September 17, 2019

I'm sorry I have a f401re and I'm trying to read a data stream from an mpu in i2c, if it were possible to have an example with the callbak function?