cancel
Showing results for 
Search instead for 
Did you mean: 

difference btw system reset and poweron reset

bilal
Associate II
Posted on May 25, 2013 at 12:42

hi 

1.)i have a little confusion, if controller can differentiate between system reset and power on reset itself?

mean i want to skip few lines of code on system reset but not on power on reset

2.) i have a stm32f4 discovery kit. while checking a long array of 3000 plus bytes. it truncates the rest of values

thank u in advance 

Bilal

3 REPLIES 3
Posted on May 25, 2013 at 13:27

b) just sounds like a coding failure on your part, without providing code you're asking everyone to guess what you've done wrong.

a) Not sure I fully understand the question, but there are many ways to look at this. You have things like PWR_GetFlagStatus() and RCC_GetFlagsStatus(), and you can also place magic values in SRAM. A combination of these technics should permit you to determine if the system was previously powered and initialized.

Remember the PWR/BKP domain has a different/independent reset. You can check it and the RTC.

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/DispForm.aspx?ID=29791&RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Software%20reset%20flag%20%28SFTRSTF%29%20in%20RCC%20CSR%20register%20what%20source

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
bilal
Associate II
Posted on May 25, 2013 at 14:48

Posted on May 25, 2013 at 16:01

If you are allocating this space as a local/automatic variable you need to be aware of the stack size allocation. Keil normally has this in the startup_stm32f4xx.s. You'd need to copy this file to your local project directory, and remove the read-only attribute before doing a remove/add of the file into the project groups it's currently in.

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