cancel
Showing results for 
Search instead for 
Did you mean: 

Working with I2C and GPDMA on STM32U585 (B-U585I-IOT02A)

WrenchInTheWorks
Associate

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.

 

WrenchInTheWorks_1-1738543108951.png

WrenchInTheWorks_2-1738543128033.png

WrenchInTheWorks_3-1738543150868.png

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

 

 

0 REPLIES 0