AnsweredAssumed Answered

STOP reception in UART IO with interrupt

Question asked by thy on Jun 13, 2016
Latest reply on Jun 14, 2016 by thy
Hi everybody.

I have an stm32f4 micro trying to communicate with device via UART. I want to receive with interrupts and possibly, based on some conditions, stop the reception process (i.e. if some time expires from the last \n received). Since I am reading one char at once (receiving variable length strings) and the reception is called again within the callback (see, I have to stop it outside the callback. Unfortunately I am not able to do that, this causing an overrun error next time I start reception again (since the conditions allow to do that), and I am a little stuck. I tried with something like
but it seems not working.

Does anybody have any suggestion?

Thank you and regards.