HAL_I2C_Master_Receive_DMA not returning updated values.
Hi,
I am using one I2C based peripherals with Interrupt enabled.
While using "HAL_I2C_Master_Transmit" and "HAL_I2C_Master_Receive", it seems to work properly with ISR.
But, when I am using the following I2C_DMA:
HAL_I2C_Master_Receive_DMA(&hi2c4, MPU_DEVICE_ADDR, mpu_datapair, 14);
It doesn't return updated values, it reads once and stops after that.
CubeIDE configuration includes:
- I2C4 in fast mode with DMA enabled with the Memory address incrementation
- ISR enabled for Sensor Interrupt
Controller:
- NUCLEO-L4P5ZG
ISR for reference here:
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
UNUSED(GPIO_Pin);
if (GPIO_Pin == GPIO_PIN_12)
{
HAL_I2C_Master_Receive_DMA(&hi2c4, MPU_DEVICE_ADDR, mpu_datapair, 14);
}
}I have also tried "HAL_I2C_Master_Transmit_DMA" for transmitting address, but no luck so far.
Any help would be much apreciated.
