stm32f373vb produces a short circuit after some time
Just for anyone that has experienced the same problem I'm posting the solution.

The problem was that the microcontroller was damaged in such a way that the protection diode of some port formed a short circuit between the power supply and the ground:



There were two reasons for that. The first and main reason was that I have unplugged the JTAG cable, while the PCB was switched on. I'm trying to figure out exactly how, but that action made some of the ports acting as a ground and damaging the protection diode to act as short circuit. So the conclusion is first power off then unplug the JTAG. The second reason was that the JTAG was supplied with 3.3V (VCC) from the debugger. For my previous boards JTAG supply was provided always by the PCB itself, but now for some reason it didn't worked out (though I'm measuring correct supply provided TO the JTAG) so I had to switch to the debugger power supply. I think that supplying from the debugger and at the same time from the board made a short the connection between a port and 3.3V supplied from the PCB and burned that diode. 

Conclusions: 


avoid using the JTAG debugger supply (VCC) and
avoid unplugging the JTAG cable, while PCB is powered on or 
use a dc/dc insulator for insulating the JTAG GND and VCC