MOD54415 Real-Time Clock

Discussion to talk about hardware related topics only.
dacoast
Posts: 14
Joined: Fri Apr 25, 2008 10:09 am

MOD54415 Real-Time Clock

Post by dacoast »

Is the Coldfire 54415 real-time clock peripheral able to be used on the MOD54415?
It looks like the backup battery pin (CPU Pin E16, VSTBY) is available on the Netburner MOD54415 header as pin 3.
Just wondering if its possible to use this peripheral? Are there any examples? Has anyone tried it?

Thanks.
User avatar
pbreed
Posts: 1088
Joined: Thu Apr 24, 2008 3:58 pm

Re: MOD54415 Real-Time Clock

Post by pbreed »

The next release will have a driver for this.

The 2K of standby RAM also works.

Submit a support request and well send you the driver ....
sblair
Posts: 162
Joined: Mon Sep 12, 2011 1:54 pm

Re: MOD54415 Real-Time Clock

Post by sblair »

Is there any more information on implementing the RTC support?

I'm working on a new design with the MOD54415 and am interested in including this.

Thanks.
Scott
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: MOD54415 Real-Time Clock

Post by rnixon »

What release do you have? My examples folder has one for the rtc
sblair
Posts: 162
Joined: Mon Sep 12, 2011 1:54 pm

Re: MOD54415 Real-Time Clock

Post by sblair »

Release 2.6.0. I don't see any examples listed under "RTC" or "Real time clock" unless it is named something else.

My install is for the MOD5270 which is what I've been developing for up to this point. I don't have a MOD54415 to work with here yet so hence I also don't have a license code to install the MOD54415-specific stuff.

I'm in the middle of writing the specification for my hardware guy now though...
Ridgeglider
Posts: 513
Joined: Sat Apr 26, 2008 7:14 am

Re: MOD54415 Real-Time Clock

Post by Ridgeglider »

Release notes for the 2.6.1 Beta indicate support for the on board 54415 RTC with an example.
gavinm
Posts: 59
Joined: Wed Jun 04, 2008 4:01 pm
Location: Nottingham UK

Re: MOD54415 Real-Time Clock

Post by gavinm »

Hi - I'm just following up on this post to see if anyone has successfully implemented the internal RTC on the MOD 54415?

I'm just starting a new project with the 54415 (actually porting a previous part developed project from the 5272 to the 54415).

I assume the VSTBY J1 pin 3 signal is just directly connected to the Freescale processor? And this will need connecting to a battery or super capacitor and the 3.3v supply via a diode and charging current limit resistor? Can anyone confirm this or share a practical circuit that they have working ...?

I've found in the Freescale MCF5441x "Datasheet" that contains the electrical specs. In the DC Specs Power Supply section Table 10 that it lists VSTBY as requiring 1.6v minimum. Also else where the standby current is listed as 17micro amps maximum.

Can someone also confirm that there is a 32kHz xtal on the module to keep the RTC working while on standby?

I guess all these things must be provided otherwise there'd be no point in providing the example driver ... but it give a newcomer some confidence to hear that other users have it working successfully.

Thanks,
Gavin Murray
roland.ames

Re: MOD54415 Real-Time Clock

Post by roland.ames »

I can at least confirm that the library routines work as expected. I tested them on a MOD54415, even using the non-volatile RAM to store the timezone string. My board had a 3.3v battery (cr2430) connected directly to J1pin3. I could remove the power and the RTC retains its setting and RAM contents

this code is what I added in addition to the supplied code from mcf5441x_rtc.cpp
for practical purposes I would probably remove the TEMP_PADDING, and reduce the size of stored_string

Code: Select all

#define STORED_STRING_SZ	0x800	// MAX of the available RAM in RTC chips

#define TEMP_PADDING	20
char stored_string[STORED_STRING_SZ+1+TEMP_PADDING];

const char TZ_header[] = "TZ:";
#define TZ_HEADER_SZ	(sizeof(TZ_header)-1)

int RTC_GetBackUpRam(PBYTE  pDest, int len)
{
	return MCF541X_GetBackUpRam(pDest,len);
}

int RTC_SetBackUpRam(PBYTE  pSrc, int len)
{
	return MCF541X_SetBackUpRam(pSrc,len);
}


int RTCGetTZ(void)
{

	RTC_GetBackUpRam((BYTE*)stored_string,STORED_STRING_SZ);
	if ( strncmp(stored_string,TZ_header,TZ_HEADER_SZ) != 0)
	{
		return 1;
	}
    tzsetchar(stored_string+TZ_HEADER_SZ);
    return 0;
}

void RTCSetTZ(char * tz)
{
	sniprintf(stored_string,sizeof(stored_string),"%s%s", TZ_header, tz);
	ShowData((BYTE*)stored_string,sizeof(stored_string));
	RTC_SetBackUpRam((BYTE*)stored_string,STORED_STRING_SZ);
}

User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: MOD54415 Real-Time Clock

Post by dciliske »

If memory serves, the latest rev of the MOD5441X has pads for a 32KHz XO on the top side of the module, but it is not part of the standard build. By default, the internal RTC uses the internal 32KHz internal oscillator.
Dan Ciliske
Project Engineer
Netburner, Inc
gavinm
Posts: 59
Joined: Wed Jun 04, 2008 4:01 pm
Location: Nottingham UK

Re: MOD54415 Real-Time Clock

Post by gavinm »

Hey - thanks guys, that's really useful.

Interesting to hear you say that you just connected a 3.3v battery to the VSTBY J1p3 - I'd not thought of an arrangement as simple as that!! Not re-chargeable - just replace the battery every year or so (theoretically you should get 1.5 years at least at 17uA and a 240mAhour battery, probably much longer as the 17uA is a max and the memory and RTC I think is good down to 1.6v).

If not using the RTC and RAM in a back up application I assume the VSTBY pin should be connected to the +3.3v? Like on the MOD70 board...
By default, the internal RTC uses the internal 32KHz internal oscillator
I have a new (delivered 2 weeks ago) MOD54415 and I can't find any evidence of empty pads for a 32kHz Xtal? Can you shed any light on where they are?

But if I understand you correctly right, the VSTBY supply can keep some part of the internal chip oscillator circuit running with no other power to the module - at least enough to keep the RTC (and thus the internal oscillator) running? Is that right?

Thanks,
Gavin Murray
Post Reply