UART Issue - Communication stops working when board reset button is pressed
I finally found the problem. As I said, I was using HAL UART functions (HAL_UART_Transmit/HAL_UART_Receive) inside a timer interrupt callback. 

This timer interrupt had higher priority than system's systick so the timeout of UART functions (that make use of systick) could not trigger. 

In this case, timeout does not affect if slave is connected and communication can be done. However, if slave is disconnected and master tries to communicate, master gets stucked in UART functions because of timeout.