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

scanf breaking immediately when an invalid key pressed

hi,
we are developing sample code for scanf & printf functions using retarget_io.c for stdin & stdout in cmsis rtos. we have implemented stdout_putchar & stdin_getchar functions in user code. printf is working fine. scanf also working if we are pressing a valid key in terminal. but by mistake an alphabet key (or any special character) is pressed for getting a decimal input (which allows only numeric keys), after that scanf function is not working. it is breaking immediately when a key is pressed (even valid key) and not waiting for enter key. what might be the issue?