Skip to main content
vivek
Associate III
August 22, 2019
Question

USART1 Transmit function not work using true studio but same code worked on keil compiler.

  • August 22, 2019
  • 3 replies
  • 959 views

I am init all function related to usart1.Transmit flag also set but data not transmit.

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
August 22, 2019

Lots to work with there.

What STM32?

Show Code

Check IRQ handler

Check pin configuration

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Jack Peacock_2
Associate II
August 22, 2019

When you step through with the debugger, stop at the point just after you expect the USART to start sending. Check the status register for the USART and the DMA channel, assuming you are using block DMA output (that's the most efficient way to send a block of data out the USART). Also check the NVIC registers to make sure the right vectors are enabled. Set breakpoints at the start of your USART and DMA interrupt handlers to verify the handler is being reached properly.

Above all make sure you are trapping system faults, especially hard fault, otherwise you won't have a clue as to what's happening.

If debugging is too complicated...keep using the Keil compiler since you know it works.

Jack Peacock

vivek
vivekAuthor
Associate III
September 14, 2019

thank you for solutions,problem solve by changing crystal 8MHz to 25MHz.