9210 Rea time clock

, , ,
NaRtcTime_t * time = (NaRtcTime_t*)malloc(sizeof(NaRtcTime_t));

	
	time->date = 1;
	time->month = NA_RTC_OCTOBER;
	time->year = 2013;

	time->dayOfWeek = NA_RTC_THURSDAY;

	time->hours = 11;
	time->minutes = 58;
	time->seconds = 0;
	time->hundredths_second = 0;

	if( naRtcSetTime(0, time) != NASTATUS_SUCCESS)
	{
		//error
		DEBUG_printf( "Unable To Set Time 
");
	}

	naRtcGetTime(0, time);
	DEBUG_printf( "%d/%d/%d %d:%d:%d 
", time->date, time->month, time->year, time->hours ,time->minutes, time->seconds);

Since it does not work … someone can give me a hint?

Hello, first please verify basic information. My understanding was that the 9215 and the 9360 where the two devices that had battery-backedup RTCs. I do not believe the 9210 is so configured. So I need to verify do you really mean the 9210?

I would set the date any time the device restarts so i should not need the RTC to be battery backed up.

The 9210 is mounted on a board and connected to its microprocessor using the serial port; i can get the date from the microprocessor and i would set it on the 9210

Hello

 If you go into your src\bsp\platforms directory (in the tree in which NET+OS was installed), you see that each known platform has its own directory, for example, connectcore9p9215_a, ns9210_a....etc.  Each of these platforms-specific directories has a file entitled rtc.c. In each file entitled rtc.c is the declaration of a table named naRtcDeviceTable. For platforms that support an RTC, this table is populated/initialized (with objects other than 0). If the platform does not support an RTC, then the table is populated/initialized with 0s (zeroes). The number of platforms that support an RTC is quite limited and is limited to the 9215-based products and 9360-based products. All other platforms have this table uninitialized, signifying that the RTC is not supported.