9 years, 10 months ago.

LPC812 : Loop Not Continuously Running

I wrote a program on LPC812 chip, There i implemented like certain function have to run continuously. And before start this function I implemented certain functions. The Code size is 10.8kb and Ram taking 3.3kb(83%). The chip memory size is 16kb flash memory and 4kb RAM. My problem is this, The one time Codes running correctly, While the loop started, the loop randomly running only one time or two times or two and half times. I can't understand this problem. Any one can understand this problem or faced problem like this. please Help me..

1 Answer

9 years, 10 months ago.

Most likely it runs out of memory due to memory allocated while running the loop. For starters, do you use new or malloc anywhere in your code?

Thank you i will try this

posted by siva surendar 12 Feb 2015

I think his point wasn't to try using new or malloc, it was that if you are using them make sure you are calling delete or free at the correct times so that you don't leak memory. There are normally a few ways to reduce memory usage but it's hard to give detailed answers without seeing the code.

posted by Andy A 12 Feb 2015