‎2019-07-20 06:47 AM
Hello Everyone
I design oven timer (transformerless) with STM32F042K4T6. Although I tested everything separately there is a problem in the pcb. When the system first comes on, the system works but sometimes it doesn't. I tested it 10 times and the MCU didn't work twice...
Has anyone ever experienced anything like this before? Your advice is very important to me.
Schematic;
Clock Config;
Filter Capacitor, Crystal (8Mhz) and NRTS resistance locations;
‎2019-07-20 07:16 AM
Put a pull-down resistor on PB8 (31)
‎2019-07-20 07:19 AM
Why PB8? Is there a special reason? Because I have to use that pin.
‎2019-07-20 10:11 AM
Would a pull down resistor of 4K7 preclude your usage elsewhere?
If you don't understand the relevance of the pin you might want to urgently review the documentation.
‎2019-07-20 10:27 AM
Dear Gentleman,
I would recommend to remove R24 and what means the system is not starting? If for exemple you put a simple LED toggelling and while (1) to know at which step it is hanging.. it may be a software configuration not in spec. How many units are affected?
Cheers,
STOne-32
‎2019-07-20 10:58 AM
I suspect "not starting" infers it is in the ROM as opposed to user code, or stuck in a while(1) loop in Error_Handler() if the crystal fails to start promptly.
‎2019-07-20 11:55 AM
Agreed on BOOT0 and R24.
Also I don't see the capacitors recommended in AN4080. And most likely an oven doesn't need quartz crystal at all - HSI is good enough.
‎2019-07-22 01:29 AM
Thank you so much. I did what you said and I connected that pin to GND with 10K. Normally I know the BOOT0 configuration, but cubemx didn't appear as boot0 and I didn't pay attention. It was a good experience for me. Thanks.:smiling_face_with_smiling_eyes:
‎2019-07-22 01:31 AM
I didn't want to take risks. I'll test HSI, thank you. :)