Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: GPBR not persistent in AT91SAM9XE512
PostPosted: Tue Jun 14, 2011 6:48 pm 
Offline

Joined: Wed Mar 11, 2009 4:13 pm
Posts: 14
Hi

I am trying to use GPBR on AT91SAM9XE512 to implement a full RTC in my custom board.

There is nothing about GPBR ( General Purpose Backup Registers ) on the reference manual of 9XE, but a single line saying that they exist on page 32.

With power applied in the board ( there is a backup battery also ), if I write into a GPBR, the data persist for a few miliseconds and resets.

May be I need to setup other register to GPBR be able to retain the data, but, I couldn't find any information about in the reference manual.

Below a piece of code using GPBR:

void set_gpbr(void)
{

(*((unsigned int*)AT91C_SYS_GPBR)) = 0xAAAAAAAA;

printf("GPBR0 = %08X\n\r", (*((unsigned int*)AT91C_SYS_GPBR)) );
printf("GPBR0 = %08X\n\r", (*((unsigned int*)AT91C_SYS_GPBR)) );

}

follows what I get:

GPBR0 = AAAAAAAA
GPBR0 = 00000000

Any advice will welcome.

Thanks.


Top
 Profile  
 
 Post subject: Re: GPBR not persistent in AT91SAM9XE512
PostPosted: Tue Jun 14, 2011 8:37 pm 
Offline

Joined: Thu Dec 02, 2004 2:28 pm
Posts: 454
hello,
check the starting address of the register definitions.
they should be starting with 0xFFFFFD60.

some time ago there was a change at the datasheet, which didn't find the way into the header files. in some header files like at91sam9XE....h they are defined wrong!

regards
gerhard


Top
 Profile  
 
 Post subject: Re: GPBR not persistent in AT91SAM9XE512
PostPosted: Tue Jun 14, 2011 9:07 pm 
Offline

Joined: Wed Mar 11, 2009 4:13 pm
Posts: 14
gerhardf

YEESSSSSSS!

You did it!

It was the wrong address.

Thank you very much.

I will post to Atmel Support Team about this issue.

Have a nice day.

Sergio Kamakura
Warp Tecnologia


Top
 Profile  
 
 Post subject: Re: GPBR not persistent in AT91SAM9XE512
PostPosted: Tue Jun 14, 2011 9:20 pm 
Offline

Joined: Thu Dec 02, 2004 2:28 pm
Posts: 454
hello sergio,
atmel support is already informed about this mistake but they didn't publish a new software package for the sam9xe until now.

regards
gerhard


Top
 Profile  
 
 Post subject: Re: GPBR not persistent in AT91SAM9XE512
PostPosted: Tue Jun 14, 2011 9:55 pm 
Offline

Joined: Wed Mar 11, 2009 4:13 pm
Posts: 14
Hi Gerhardf

I am working on this issue for 2 weeks, using intensively the support from Atmel.

The original problem is in linux's RTC issue, as a matter of fact. I did a stand-alone test program to determine where is the problem. Now, I can say without doubts that it is not a hardware problem in our custom board.

I double checked in the linux source code and found that the header file used for 9XE has the SAME PROBLEM, or, in other words, the address of GPBR is wrong. So, this can explain why the RTC does not work on linux.

So, it is a shame for the Atmel's tech support people that not spread this important information among them and push us ( customers ) to spend precious time in such kind of futile debug work.

Anyway, your information fixed the issue and I can go forward now.

Thank you again.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: