How can i know the used RAM?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How can i know the used RAM?

1,816 次查看
Exelsus
Contributor II
Well I'm having some weird issues, and i wanted to verify that my RAM memory is not full

I have two QE8 communicated with IIC, the slave is always listening. I have some code working properly in the slave with a lot of string processing functions, then I added a lot of more string functions to the slave and the communication doesn't work anymore. Good thing i backed up the previous code, and the IIC routines were not modified at all... So i guess is something to do with the RAM

Any sugestions?

Thanks.
标签 (1)
0 项奖励
回复
2 回复数

848 次查看
bigmac
Specialist III
Hello,
 
For the new functions, if you are storing string data within local array variables, this may be using copious quantities of additional stack, which may be overwriting your global and static variables.  You might try increasing the stack size sufficiently to accommodate the additional variables.
 
Again, the map file will indicate where the globals are stored, relative to the stack.  Unless you are using a device with a large amount of RAM, it is a good idea to keep the top of stack and the globals separated by as wide a margin as possible.  This might involve placing some of the globals within zero page RAM.
 
Often, the default PRM file is not optimum in respect of variable and stack placements, so may need to be altered.
 
Regards,
Mac
 
0 项奖励
回复

848 次查看
JimDon
Senior Contributor III
Take a look at the .map file.

0 项奖励
回复