2020-06-26 02:15 PM
2020-06-26 02: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.
2020-06-26 02: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 .
2020-06-26 03: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.
2020-06-26 03: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
2020-06-26 05:50 PM
Can you write a small framework that initializes the USART2, the clocks, the pins, and outputs a character in a loop?
2020-06-26 09:35 PM
CubeF4 contains UART examples, you may want to start there.
JW
2020-06-27 02: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.
2020-06-27 03: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
2020-06-27 03:00 AM
Yes