Timeout on usart2 with DMA
Hi everybody,
I'm using a STM32L476RG. I use the usart2 to transmit/receive frames from an external sensor. The reception is working with DMA1 channel6 (I use Transfer complete and idle line interrupts), and it works very well.
I'd like to add a timeout to prevent the non reception of a frame.
My sensor is supplied in 12V and microcontroller is asking it ervery 0.5s. Sensor responds directly.
To simulate a broken sensor, I just unplug it from supply, so microcontroller doesn't receive any frame. When I plug again my sensor, I can see that the sensor is responding (on a terminal (docklight)) but not my microcontroller.
By checking registers, I see that idle line IT is generated but no TC interrupt. I see, also that my DMA buffer doesn't receive any character (as it was blocked). I tried to reset DMA, flag IT, and nothing happens.
Have you some ideas to help me on this point ?
Fabrice
