I'm try building a usart program.
I copied the example code "Simple-USART-Example-0.8" ,it works fine when testing on computer,with human typing input.
But when directly connect to another board,it lost some charter,only display 1st char of a sentence.
I think it's because:
The Tx board is sending data continuously(much faster than human type).
When our RX board sense 1 char,program go to store and display data,this process may take 1ms
But Tx board is still sending data with in this 1ms,when pointer is storing data and displaying,so following Tx data is missed.
Solve:
1.decrease storing time,increasing application handler_frequency,store data in a fast time before next tx data come.
or
2.put the storing data function in other handler,which is called very frequent.
1 is not good,when change system freq usart baud rate will get kind of mass up.
so if any one know how to put a function in a custom handler,
sort of this format:
custom handler()
{
USART_GetStringBuffer();
}
what is the format and where to put it?
or I got totally wrong?
Im using open4stm32f107 and circleos-4.61.
thanks in advance.