My team wrote a library of common FRC tasks to extend off of WPILib.
We wrote code for Stall Detection in the form of an abstract base class, and implemented it with the CANJaguar interface and Analog Channel (PWMs)
Basically we just measure the voltage diffs of what we want to check for stalling, if it hardly varies than you have a stall.
Our Stallable Class:
https://github.com/FRCTeam1073-TheFo.../Stallable.cpp
CANJaguar Implementation (look at line 14):
https://github.com/FRCTeam1073-TheFo...tCANJaguar.cpp
You're fully welcome to use our code, and I'm more than happy to help adapting it for your purposes if you'd like that.