Sorry, this is probably a really stupid noob question. I'm just spinning up a lm3s1b21 design and working on an I2C driver. This is spaghetti code using the Stellarisware library (no OS).
What Ive found is that some local variables are being stored in processor registers. This is an automatic occurance and not something I specified in the declaration. The value of these registered variables are not being pushed onto the stack and restored when sub functions are called. As such the variables are are obliterated when the functions return.
Any suggestions?
Thank you
-Gary