[En-Nut-Discussion] Interrupt 2 with new Nut OS 4.2.1

Joerg Wiegelmann wiegelj at gmx.de
Sun Nov 5 16:52:23 CET 2006


Hello Nut-Os-Fans.
I'm using the interrupt 2 to serve my RTC device every second. With 
Nut-Os 4.0.3 and before all works fine. With the new version 4.2.1 the 
OS stops serving the interrupt after a couple of minutes. Because I have 
only one Ethernut board and this board is on duty as a home automation 
server, it was not possible since now to have a long debug session.
So I would like to ask on this way if anyone had an idea or made changes 
at the OS??.
Hardware is Ethernut 1.3g, Compiler Winavr and here a part from the 
serving routine:
void rtc_handler(void *dummy){
  /* Interrupt loeschen */
  static BYTE SecondBuffer=0xFF;
  BYTE ControlReg=RtcRegister[RtcRegControlA];
  //sbi(EIFR, INT2); /* Interrupt bestätigen */
  /* Ereignis an die Weiterverarbeiung übermitteln */
  if (
     (ControlReg&RTC_IRQF)&&
     /* Aufgrund des Fehlers im Uhrenbaustein, kommt der IRQ zu oft. 
Deshalb wird noch abgefragt, ob sich die Sekungen                     
tatsächlich geändert haben */
     (SecondBuffer!=RtcRegister[RtcRegSeconds])
     )
  {
   SecondBuffer=RtcRegister[RtcRegSeconds]; /* Sekunden auf aktuellen 
Stand bringen */
   InterruptEvent|=K_BIT_RTC_INT;
   NutEventPostAsync(&InterruptThreadHandle);
  }
}
I comment out the interupt acknowledge, but without effect (sbi(EIFR, 
INT2)).

Best regards
Joerg





More information about the En-Nut-Discussion mailing list