AnsweredAssumed Answered

Multiple reads using DMA

Question asked by sinitsin.artyom on Mar 30, 2016
Latest reply on Mar 30, 2016 by FTITI.Walid
Does DMA has FIFO buffer of commands? My task is to read multiple bytes from different registers via I2C alternately. Could I just write like this:
/*Somewhere in code....*/
HAL_I2C_Mem_Read_IT(&hi2c2,
  (uint16_t) DEV_ADDRESS,
  (uint16_t) REGISTER_1,
  I2C_MEMADD_SIZE_8BIT,
  (uint8_t *) buf_1,
  6);
 
HAL_I2C_Mem_Read_IT(&hi2c2,
  (uint16_t) DEV_ADDRESS,
  (uint16_t) REGISTER_2,
  I2C_MEMADD_SIZE_8BIT,
  (uint8_t *) buf_2,
  6);


And then catch callbacks.

Or maybe there is prettier way to read from two registers?

Outcomes