lptmr code for hall effect sensor, added rm