cancel
Showing results for 
Search instead for 
Did you mean: 

32F746 USART DMA with STemWin not working.

Jame DEV
Associate III

I'm working on STM32F746 discovery wtih STemWin(firmwere F7 1.15). I'm tested on both UART1 and UART6.

It's work fine without DMA and it's also worked with interrupt too.

When i try to run with DMA. Hardware not even send an output data(I'm checked with my oscilloscopes). And huart keep busy all the time.

So i give up trying on STM32F746 discovery. And tested on STM32F746 Nucleo board. I'm setup with cudeMX. And enabled only UART2 and UART3 with DMA and global interrupt. Than i'm found the problems UART3 DMA not wotking but UART2 DMA work fine. And than i try UART2-3 without DMA , Only interrupt. And It's works.

I'm tried to result this problem for 2 days now. And i have no clue what's wrong with it. Please help me.

1 ACCEPTED SOLUTION

Accepted Solutions
Jame DEV
Associate III

YESSSSSSSSSS. I found the problem.

In /* Initialize all configured peripherals */(main.c). You have call MX_DMA_Init() function. before MX_USARTx_UART_Init().

Wasted 2 day because of this thing.

View solution in original post

9 REPLIES 9

Are you talking about Tx or Rx?

Did you observe the USART pin(s) using oscilloscope/logic analyzer?

Read out and check/copmpare to the working case the content of relevant USART and DMA registers.

I don't Cube/CubeMX.

JW

PS. Please change your username to a normal nick

Jame DEV
Associate III

DMA not work on both RX and TX. And yes. I'm observe both RX TX with oscilloscope too. And i'm debug the memory too. On RX pin it's have a signal coming form debugger but DMA RX not working.

Jame DEV
Associate III

YESSSSSSSSSS. I found the problem.

In /* Initialize all configured peripherals */(main.c). You have call MX_DMA_Init() function. before MX_USARTx_UART_Init().

Wasted 2 day because of this thing.

Thanks for coming back with the solution. Please chose your post as Best so that the thread is marked as resolved.

JW

@Amel NASRI​  - here again the order of calling some Cube and DMA related functions is mentioned, couldn't this be a similar issue than with the ADC-DMA?

Yes it should be the same issue, I'll highlight it again internally.

Sorry for the inconvenience this created for you and all other STM32CubeMX users who faced similar problem.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks, Amel.

Jan

@Amel NASRI​ 

Hello @Jame DEV​ 

Could you please give me the CubeMX version with which the user created the project initially. Because, i was not able to reproduce the problem by starting a project from scratch.

Best regards,

Nesrine

STM32cudeMX 5.4.0

Best regards,

James

Hello @Jame DEV​ 

Thanks for the feedback,

It will be fixed on the next version of CubeMX.

Best regards,

Nesrine