2019-09-05 05:40 AM
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
Solved! Go to Solution.
2019-09-16 04:15 AM
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.
2019-09-16 03:41 AM
please someone answer me!!!!!
2019-09-16 04:15 AM
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.
2019-09-17 08:23 AM
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?