cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4Q5VGTxP DMA why it doesn't work.

YPark.5
Associate II
  • STM32L4Q5VGTxP I use the board I made.

FUNC 1) HAL_SPI_Transmit(ILI9341_SPI_Handle,&data,1,100);

The output waveform is observed with SCLK / MOSI PIN.

FUNC 2) HAL_SPI_Transmit_DMA(ILI9341_SPI_Handle,&data,1);

Output waveform does not appear with SCLK / MOSI PIN.

After executing HAL_SPI_Transmit_DMA once

(check function)

HAL_SPI_StateTypeDef err;

err = HAL_SPI_GetState(ILI9341_SPI_Handle);

while(err != HAL_SPI_STATE_READY){

err = HAL_SPI_GetState(&hspi1);

}

The result continues to return err (HAL_SPI_STATE_BUSY_TX).

Below is a picture of CUMEMX setup.0693W00000Dq6c2QAB.png0693W00000Dq6bxQAB.png 

0693W00000Dq6beQAB.png 

//======================== PS

HAL_ADC_Start_DMA(&hadc1,&adc_dma_buffer[0], 4);

Also, it doesn't work.

What did I miss, where did I go wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Ensure MX_DMA_Init is called before MX_SPI_Init.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

Ensure MX_DMA_Init is called before MX_SPI_Init.

If you feel a post has answered your question, please click "Accept as Solution".
YPark.5
Associate II

Wow!

Previously, the project was applied in order in hal, but as TDK said, it was changed.

Really thankful.

It works normally now.