How do I access the angle clock?

eTPU_C

The angle clock hardware allows microcode to watch the turning of a gear, and act at angles or rotations.

The TPR register, type register_tpr is specified as a structure:

struct tpr_struct {
  int TICKS   : 10;
  int TPR10   : 1;
  int HOLD    : 1;
  int IPH     : 1;
  int MISSCNT : 2;
  int LAST    : 1;
  } ;
	 

Also, AddAngle() and SubAngle() macros (that perform modulo angle operations) are available in etpuc_util.h.