cancel
Showing results for 
Search instead for 
Did you mean: 

I2c receive with dma

SDall
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

3 REPLIES 3
SDall
Associate II

please someone answer me!!!!!

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
Associate II

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?