2009-02-15 01:22 AM
Physical memory for buffer interfered by random instructions
2011-05-17 04:02 AM
Hello,
I'm currently struggeling with a really strange problem. I'm having a global variable ''u32 SDO_Buffer[SIZE]'' as a ring buffer. It basically works to access it and write my data into the buffer, but what also does happen, and that's the weird thing, is that random instructions in the code cause to write random data into the buffer (or at least the same physical memory). Those instructions could be a simple delay: for (i=0; iOr a local variable in a totally other part of the program: TxMessage.DLC=DLC; The local variable still works, so it doesn't look to me that they're sharing the same physical memory. But somehow the instruction itselfs seem to affect that physical memory, where my buffer is ''stored''. Any suggstions where to look at? I'm thinking about using malloc to dynamically allocate my memory. But that's just a work-around and doesn't fix the problem, which could occur at any other point again. Don't know if that helps, but I'm using the newest Keil MDK 3.40 (Evaluation Version) Thanks -Stefan2011-05-17 04:02 AM
Hi-
Use IAR - would like to see if I can replicate your condition. Can you post the minimal code which regularly causes this effect? Also - provide the STM32 part no. - I can test across several devices...