cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F030C6 Supply voltage sensitivity

sebastien239955
Associate II
Posted on December 12, 2015 at 18:42

Hi there,

I am using a STM32F030C6 behind a buck stepping down a voltage to 5,5V, then a LDO regulating to 5V and finaly a LDO to regulate a 3,3V for the STM.

At the scope, the 3,3V is almost clean. Still having some 80mV spike due to stepping down.

The problem is that the STM run the program for about 200ms and then an hardfault is triggered. The program is actually doing nothing => Nothing is supposed to happen at t0 + 200ms. 

I made some investigation, and I found out that the STM32 is running fine with a 5V from USB instead of the 5V of the first LDO.

Hence, I wonder if the problem can come from a ''voltage supply'' problem? And why it triggers an hardfault? (this device does not even have a PVD, only POR/PDR)

Thank you very much for your answers,

#worst-forum-software-ever #stm32f030c8
10 REPLIES 10
Posted on December 12, 2015 at 18:53

> hardfault is triggered.

How do you know that? Debugger attached? What happens if you disconnect it?

> The program is actually doing nothing

That is what, exactly? I'd start with a blinkey.

JW

Posted on December 12, 2015 at 21:11

And why it triggers an hardfault?

ARM committed a load of silicon to help answer this very question, and ST has some more telling you why it reset in different circumstances. A while(1); loop in the handler isn't going to be very enlightening.

I guess I'd start with the code in SystemHandler(), and it's expectations for external clocks and the PLL.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on December 12, 2015 at 21:14

From a thread just yesterday,

''Assuming the supply is browning-out, suggest you use a 2 ch scope, trigger on falling edge of NRST on first channel, with second channel attached to supply.''

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
sebastien239955
Associate II
Posted on December 13, 2015 at 10:44

Hi,

Thank you for quick reply.

I know it because I have a UART connected to it with a trace on exception that says that the program stops on a hardfault.

The program is only a blink led. The led turns on and is toggled every 500ms. Most of the time the led turns on and then the hardfault occured. The result is the same with UART disconnected.

I have clear UART communication before hardfault, which occurs several ms later. To me, it means that the clock system is stable.

I will check for the NRST behavior. If it does not go down, does it means it is not à brown out, then not a voltage problem?

What about POR/PDR?

Thank you

PS: Sorry for previous post. I was on my phone, and it apparently did not work as expected

Posted on December 13, 2015 at 11:40

> I guess I'd start with the code in SystemHandler(), and it's expectations for external clocks and the PLL.

... like disabling any juggling with external clocks and PLL and leaving it on the default HSI?

Some of the ''inexplicable'' faults on the forum turned out to be incorrectly set FLASH latency.

JW

sebastien239955
Associate II
Posted on December 13, 2015 at 12:05

Hi,

It would make sense that it comes from a Flash problem (it would at least explain why a Hardfault is trigger). Could you detail how to set the flash latency correctly?

Thank you

sebastien239955
Associate II
Posted on December 13, 2015 at 12:27

I manage to scope the NRST signal. I effectively have very short falling edges (<5µs). 

These falling edges are sync with spikes (80mV) on the 3,3V. My scope is very simple, I may not see that the spike are higher than 80mV but on a very very short time.

So, it comes back to my first question about sensitivity. Is it normal that the STM32F030 reset for such ''small and short'' spikes? Is there a programmable threshold that can be set to be more tolerant? And I still don't understand which hardware module trig the reset as there is no PVD in this STM.

Thank you again for your time and advices

Posted on December 13, 2015 at 15:37

I'm not familiar with your design, make sure you have adequate bulk capacitance on either side of the regulator, data sheets usually specify a minimum, and for the STM32. These should be placed close to those components to address instantaneous current requirements.

The thresholding devices are designed to be sensitive so the devices reset properly and don't get into indeterminate states. I think you need to look upstream.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on December 13, 2015 at 15:41

Sorry for previous post. I was on my phone, and it apparently did not work as expected

This superb Microsoft forum software does not work well with mobile devices, given their penetration into those market perhaps they don't realize how popular they are, and how large the market actually is?

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