2025-02-02 04:42 PM
Hello,
I've been playing with the U585 IOT dev board and really enjoying it, I've got I2C communicating with the sensors without DMA and now I would like to test out the GPDMA. However, there is a little more too this DAM controller then the DMA on the older STM32s which is what I'm used too.
I've done the bellow configuration in MX and I'm then calling HAL_I2C_Mem_Read_DMA, while HAL_I2C_Mem_Read works fine HAL_I2C_Mem_Read_DMA returns HAL ok but the data value, which should be 179 from the Who_Am_I reg of the LSP22HH, remains 0. I'm guessing my issuse is with my GPDMA config since I have not used it before.
uint32_t I2C_Read(uint8_t address, uint8_t reg, uint8_t *data, uint16_t len) {
return HAL_I2C_Mem_Read_DMA(&I2C_Handle, address, reg, I2C_MEMADD_SIZE_8BIT, data, len);
}
Another question I have is what are the callback functions I need to define for TX/RX Cplt?
Cheers,
Michael