Home/Support/Support Forum/9210 Rea time clock
New and improved user forum site going live on 12/6 (All users will need to reset their password when the new forum is active)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

9210 Rea time clock

0 votes
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 \n"); } naRtcGetTime(0, time); DEBUG_printf( "%d/%d/%d %d:%d:%d \n", time->date, time->month, time->year, time->hours ,time->minutes, time->seconds);

Since it does not work .... someone can give me a hint?
asked Oct 1, 2013 in NET+OS by gavello New to the Community (16 points)

Please log in or register to answer this question.

2 Answers

0 votes
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?
answered Oct 1, 2013 by dakotas_dad Veteran of the Digi Community (694 points)
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
0 votes

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.
answered Oct 1, 2013 by dakotas_dad Veteran of the Digi Community (694 points)