cancel
Showing results for 
Search instead for 
Did you mean: 

[Very Urgent Help] The STM32F042K4T6 integrated sometimes does not work. I'm restarting the system from the NRST pin. If I'm throwing resat 10 times, the system works in 8 and the microcontroller does not start in 2 of them.

mfurkanuyar
Associate II

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;

0690X000009YwaaQAC.png

Clock Config;

0690X000009YwcCQAS.png

Filter Capacitor, Crystal (8Mhz) and NRTS resistance locations;

0690X000009YwcgQAC.png

8 REPLIES 8

Put a pull-down resistor on PB8 (31)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Why PB8? Is there a special reason? Because I have to use that pin.

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
STOne-32
ST Employee

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

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Piranha
Chief II

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.

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.😊

mfurkanuyar
Associate II

I didn't want to take risks. I'll test HSI, thank you. 🙂