I want to write a Code in Usart such that If It received "HELLO" It should transmit "HOW ARE YOU " in return . Can anyone help me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-26 2:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-26 2:42 PM
You want to write the code, or you want someone else too?
On what part? Using SPL, HAL or registers?
Probably want to use the HAL_UART_Receive_IT() one character at a time, build a buffer or state machine to recognize the request. Dispatch response using HAL_UART_Transmit_IT() perhaps from a buffer or queuing scheme.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-26 2:48 PM
I am using STM32 F4 board .
Using USART2
DMA
using HAL libraries.
And using TTL port to send and receive data .
Now I want to write a code In which I send HELLO in the rx and get HOW ARE YOU in return with tx .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-26 3:36 PM
I'd probably avoid DMA on the receive side, doesn't bring much in the way of efficiency, and does make things more complicated.
For DMA transmit, you might want to use a scatter-gather list to keep track of the data in-flight to ensure the buffer content isn't changed or reused.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-26 3:56 PM
You tell me the steps And I will follow I am a beginner and cant understand some of terms you are speaking about
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-26 5:50 PM
Can you write a small framework that initializes the USART2, the clocks, the pins, and outputs a character in a loop?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-26 9:35 PM
CubeF4 contains UART examples, you may want to start there.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-27 2:00 AM
for a complete beginner you are ambitious.
First make an application that receives 1 character and copies it on transmission (echo). The rest will be easy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-27 3:00 AM
yes I have done that As HELLO WORD comes on RX and also get Transmitted .
If I send hello world I get Hello world back
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-06-27 3:00 AM
Yes
