This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

urgent: timeout code for stm32l073rz

hello! I am using stm32lo73rz in ll(low layer) i am trying to send string by docklight by using timeout function. But function not works properly. may be something wrong in my code. Please any one can send me code its urgent.
Logic : i want to send suppose 'uart' 4 letter string by docklight and for this in my code i putted up if( strncmp( ( const char* )rx_buffer, ( const char* )MSG,6 ) == 0 ) then LL_USART_TransmitData8(USART2, ('w')); w will be transmit. similarly i putted condition for less than 4 letter string and greater than 4 letter string and respectively i get message.
BUT I WANT TO PUT TIMEOUT CONDITION. SO HOW COULD I PUT TIMEOUT CONDITION FOR THIS LOGIC.
TIMEOUT LOGIC : if suppose i am sending 'uart' ( timeout initialze with 100ms) then if 'u' will come at processor timeout start and suddenly 'a' come then "timeout==0" and then 'r' will come so again "timeout==0" and when 't' will come timeout has done and send any message.
This thing i want to do please if anyone already have done this please send me code or suggestion about function.
Thank You