cancel
Showing results for 
Search instead for 
Did you mean: 

I3C issues with DMA, no hdmacr handle

DanLumi
Associate II

Dear ST Community,

I'm trying to integrate I3C with DMA capability in my project (NUCLEO-H563ZI). Currently, I can run SPI/UART with DMA enabled, but I3C does not want to join the club (it works with IT, though).

After I configure DMA for I3C in the STM32CubeMX interface (GPDMA1):

RX CH2:

DanLumi_0-1750464029325.pngDanLumi_1-1750464044907.png

TX CH3:

DanLumi_2-1750464079003.pngDanLumi_3-1750464091982.png

And replace data transfer line:

HAL_I3C_Ctrl_Transmit_IT

to

HAL_I3C_Ctrl_Transmit_DMA

I face issues with the later function. Particularly, it fails confirming the existence of the hdmacr handle:

/* Check on hdmatx and hdmacr handle */
    else if ((hi3c->hdmatx == NULL) || (hi3c->hdmacr == NULL))

But I'm not sure what that means. The DMA handle from the DMA configuration tab is the same for both SPI/I3C since they both are in the same GPDMA 1:

  • CH0: SPI TX.
  • CH1: SPI RX.
  • CH2: I3C TX.
  • CH3: I3C RX.

My first question would be, can SPI/I3C live with the same GPDMA resource?

My second question, can I assign a different handle to I3C as they share the same names for SPI's TX/RX:

  • TX: hdmatx
  • RX: hdmarx

Any other clue/tip is greatly appreciated.

Thanks!

0 REPLIES 0