Thread: VxWorks Kernel
View Single Post
  Spotlight this post!  
Unread 04-04-2009, 10:40
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: VxWorks Kernel

The FRC watchdog is not implemented in the kernel, but in the FPGA. cRIO, which NI pronounces see-ree-oh, rather than kree-oh, stands for compact Reconfigurable I/O. The reconfigurable piece is the FPGA which can be used to implement lots of custom circuit fabric.

In the FPGA for FRC, almost all of the outputs are conditional. If the system watchdog timer is happy and fed, then the setpoints for PWMs, relays, etc. will be in control of the I/O. If the watchdog is unhappy and unfed, the outputs are forced to the disabled state.

The watchdog itself is simply a counter, like an egg timer. Each time it is fed, the countdown timer is reset to the watchdog period, ~200ms I think. The e-stop and kill immediately set the value to zero, and prevent a simple feed from enabling again. Much of the watchdog circuitry is actually the interconnection to the I/O.

The system watchdog is completely controlled by the communications protocol. If the system watchdog goes unfed it is because the DS control packets have stopped arriving, or possibly because the task on the cRIO that handles the packets has somehow died and is no longer feeding the watchdog.

The second watchdog, the user watchdog, is also not implemented in the kernel. It is implemented in the WPI layer. If it is used, it must be fed. If your user watchdog goes off, search for the feed calls. It means that NONE of those were called for the watchdog period. Personally, I think there are a number of API changes that can make watchdogs easier and even safer, but that is for another year.

Greg McKaskle
Reply With Quote