Stm32 crystal loses oscillation
The problem was on the capacitors of the crystal. I first replaced the resistors going to the mcu with jumpers but the problem persisted. Then I changed them with smaller (33Ohm) ones as suggested. Then I replaced the capacitors  with 18pF ones and the problem was there but significantly reduced. Then I reflowed the capacitors and ended up using more solder than I usualy use (made small blobs at each capacitor end) and the problem disappeared. I suspected that something wrong was happening with the capacitors because I was able to measure capacitance with my multimeter on the first, but not one the second one.
I hope that everything will be ok now.
Thank you all for your suggestions.
:)