WHETHER XMEGA64A1U RESET AUTOMATICALLY?

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i am using xmega64A1u in my project and i utilized 80% of flash memory. the board getting rebooted automatically even while the board in normal condition.

if there is any way to find the reason for reset and how we can see the stack memory using Atmel-ICE Debugger.

anyone please suggest some idea to solve this issues.

This topic has a solution.
Last Edited: Fri. Dec 7, 2018 - 05:33 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Reset status register will show if there have been any resets since power on.  The power on bit will always be set so you can ignore that one.

 

How much ram is used as shown by the build?    Ram starts at 0x2000.  The data sheet for your chip will show how much RAM you have.  My old data sheet says you have 0x1000.

 

You can see the stack pointer in the debugger.  

 

 

 

Last Edited: Fri. Nov 23, 2018 - 03:59 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mekanathan wrote:
and i utilized 80% of flash memory.
That's probably not the one that matters! It's more likely the RAM usage that may be an issue. If you build and it also said you were using 80-90% of the RAM that could well be the problem as you generally need about 25-30% free to give it room to run stuff (heap/local usage does not figure in the build time usage report)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mekanathan wrote:
... and how we can see the stack memory using Atmel-ICE Debugger.

anyone please suggest some idea to solve this issues.

Atmel Studio 7, Stack Overflow Detection Using Data Breakpoint

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i have read the status register value but while controller getting resetted there s no flag raised in status register and its showing 0... any one help me to identify the issue

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The controller isn't being reset.  That's a hardware thing.  Your stack is probably colliding with the data in RAM.  This can cause the CPU to jump back to address zero.

 

How much free RAM do you have?  The build will show you.  It's called "Data Memory".  Here's what mine says:

 

                Program Memory Usage     :    53200 bytes   38.2 % Full
                Data Memory Usage         :    651 bytes   7.9 % Full

 

 

gchapman's post gives instructions for how to set a data breakpoint at the end of linker assigned RAM data.  
 

Last Edited: Thu. Dec 6, 2018 - 01:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

                while build im getting this data

                Program Memory Usage     :    57902 bytes   83.2 % Full
                Data Memory Usage         :    1271 bytes   2.2 % Full

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

The Data Memory Usage numbers don't make sense to me.  If 1271 bytes is 2.2 % full, you would need to have a hell of a lot of RAM on that chip.  My calculation says 57,772 bytes.

 

In fact 1271 of 57902 is 2.19 %.

 

Or maybe my old brain no longer works right.

 

I'm guessing you are hitting a breakpoint in main for the second time.   

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Data Memory Usage numbers don't make sense to me.  If 1271 bytes is 2.2 % full, you would need to have a hell of a lot of RAM on that chip.  My calculation says 57,772 bytes.

 

In fact 1271 of 57902 is 2.19 %.

 

 u are right its showing wrong....... how the compiler will show wrong data?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kindly check the Attached file

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What Studio version do you have?

 

Try changing the device in the project properties.  You could try the 128a1u or 256a1u, just to see if the bug is only for the 64a1u.

 

According to my datasheet, the 64a1u has 4096 bytes of RAM and the 128a1u has 8192.  I don't have the data sheet for the 256a1u.

 

Last Edited: Fri. Dec 7, 2018 - 01:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mekanathan wrote:
how the compiler will show wrong data?
old device pack?

http://packs.download.atmel.com/#collapse-Atmel-XMEGAA-DFP-pdsc

...

 

1.0.39

...

Add external SRAM to list of address spaces.

 

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The picture shows GCC 4.9.2 so this is an old (and quite possibly buggy!) version of Studio. I suggest you download the latest issue of Studio 7.

 

BTW it's much more useful if you do not post pictures but, instead, copy the contents of the "Output" tab and paste them, as text, into a message here. The lines in your picture are truncated so I can't see the -mmcu= value.