cancel
Showing results for 
Search instead for 
Did you mean: 

Data corruption in stm32f103

f239955_st
Associate
Posted on February 25, 2016 at 11:12

Hi everybody,

I am using stm32f103 controller in that I have used a structure which have few flags (1 bit member), few char member and few Float member for reading and some data and controlling it.

I am reading data and using it in different functions but sometime my data become 0 0 or garbage. sometime anyone data member of the structure become garbage.

 

#memory-corruption
3 REPLIES 3
Posted on February 25, 2016 at 11:59

Most probably a coding error than one with the chip.

Check that your stack allocation is sufficient.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
f239955_st
Associate
Posted on February 26, 2016 at 12:08

I have increased stack size and heap size even though the same issues.

Some variables are only changed at a single place but sometime it become 0.

I don't know what is the issues?

Posted on February 26, 2016 at 12:41

Ok, but understand that I have zero visibilty into your issue, you need to make a better presentation of what's running rather than just the symptoms of the failure.

What compiler is being used? Does the failure go away if you turn off optimization? Does it fail repeatedly in the exact same way? Do you have DMA or interrupt activity? Are you overclocking the part? Have you verified the clock speeds and flash states?

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