There are somethings I do not completly understand. For my project, I use $1 as library. So when I'm working on USART/IR, I use functions like $1, etc. Should I use register flag to lead my project ?
For the time being, I don't want to use interruption for sending/receiving string. I think it's possible, don't you ?
After reading some pages of the STM32F10x_ref_manual, I've tried to understand what is wrong in my code. The manual says that before sending data, the transmiter send a idle signal. Thus, in my receiver application for Primer2, in the $1, I've something like below :
Is-it wrong ? I'm asking this because my app freeze (waits in a while-loop) after my transmiter sends it chars. I've put a framecounter in order to detect when my app freezes. It freezes after receiving 4 expected chars. If I try to send someother chars, the framecounter increaments by one. Do you see what I mean ?
Btw, I changed my PutChar function to :
Can anyone tell me more about my mistakes please ?
After more tests, I noticed that the 1st time I send the string "1234", I receive "1123" and next "1234". Can someone explain me why ?
I've read somewhere on the forum that I've better to use an other USART (USART2 or 3). Is this really important for IRDa ?
Thank you in advance.