AnsweredAssumed Answered

STM32 Hangs when program too big, stack and heap increase not help

Question asked by burdzy.pawel on Jan 6, 2016
Latest reply on Jan 6, 2016 by Clive One
Hello anyone who want to help me.

Got problem with my code, just do weird things when code become too big (not sure it is code size depend). I though it could be a problem with stack or heap but increasing them doesn't help at all. Written many codes and same happen, no mother it is compiled with Eclipse+GCC or Keil. Used: STM32F103C8T6 or STM32F105RBT6.

Maybe it is problem with code alignment. I observed I could help to work code fine when use asm("nop") (2 or 4 times) in place where code behave weirldy. Then code works perfectly. Changing the code in other place and same happen so then I need to remove asm directives (2 or 4) and again everything is fine. Could anyone explain me this thing?

Big thanks guys!
Pawel

Outcomes