I have an STM32F103C8 board and my program is switching the GPIOB1 with frequency of 500KHz.
At first, microcontroller runs the program perfectly but the main problem is that MCU resets after a couple of hours and stays at reset mode until I disconnect the board from the power supply. If I power the board immediately after disconnecting, MCU will not work but if I power the board few minutes later, the MCU works properly just for a couple of hours and after that, the same problem is repeated.
I already faced another problem that this issue was happening after 15 minutes, I added a 10uF capacitor to the VDD3 pin and now, this problem(going to reset mode) happens after about 5 or 6 hours.
Do you have any suggestions about hardware or program?
What should I do with the reset pin? (Currently, I'm pulling up nRST pin with a 10K Ohm resistor)
Can this happen because of the wrong power-up sequence on VDD, VDDA, and nRST pins?
Is this similar to a clock malfunction?
This is the schematic
Thanks in advance,
Amir