Page 1 of 2

MOD54415 Real-Time Clock

Posted: Thu Oct 18, 2012 8:31 am
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.

Re: MOD54415 Real-Time Clock

Posted: Thu Oct 18, 2012 10:49 am
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 ....

Re: MOD54415 Real-Time Clock

Posted: Mon Mar 18, 2013 2:17 pm
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

Re: MOD54415 Real-Time Clock

Posted: Mon Mar 18, 2013 2:21 pm
by rnixon
What release do you have? My examples folder has one for the rtc

Re: MOD54415 Real-Time Clock

Posted: Mon Mar 18, 2013 2:30 pm
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...

Re: MOD54415 Real-Time Clock

Posted: Mon Mar 18, 2013 2:43 pm
by Ridgeglider
Release notes for the 2.6.1 Beta indicate support for the on board 54415 RTC with an example.

Re: MOD54415 Real-Time Clock

Posted: Thu Jul 03, 2014 12:28 pm
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,

Re: MOD54415 Real-Time Clock

Posted: Thu Jul 03, 2014 7:38 pm
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);
}


Re: MOD54415 Real-Time Clock

Posted: Thu Jul 03, 2014 9:32 pm
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.

Re: MOD54415 Real-Time Clock

Posted: Fri Jul 04, 2014 7:48 am
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,