This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Configure TM4C123GH6PM timers for CCP 24 bit operation

I try to configure timer 0 (in theory is the same configuration for all timers) as 24 bit individual input-edge count, in the table 11-3 (page 708) of datasheet, show that for this mode of operation, the prescaler behavior as timer extension, and the upper  count value is stored in the GPTMT0PR register, and the lower bits in the GPTMT0ILR register (page 714), if the lower bits are a 16 bit word, and the higher bits are an 8 bit word (8 + 16  = 24), then the maximun value for the lower part is 0xFFFF (65,535) and for the higher part is 0xFF(255), but when i try to load this values, the timer function is wrong and not count, only if the lower value is 0xFFFE (65,534), the counter works. I'm using the Tivaware API, my code is as follows:

//*****************************************************************************
//
// This function set up Timer0 as follow;
// -Edge count in CCP1 PB7 pin, PB7 with internal pull-down
// -Concatenated 24bit Prescale:Timer0B counter
//
//*****************************************************************************
void
ConfigureTimer0CCP1(void)
{
	//**************************************
	// Configure the CCP1 (Timer0 B, PB7).
	//**************************************
	//
	// Enable the Timer0 and related GPIO peripheral.
	//
	ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
	ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
	//
	// Configure PB7 as the CCP1 pin for timer 0.
	//
	// This is set up to use GPIO PB7  which can be configured
	// as the CCP1 (Timer B) pin for Timer0.
	//
	ROM_GPIOPinTypeTimer(GPIO_PORTB_BASE, GPIO_PIN_7);
	ROM_GPIOPinConfigure(GPIO_PB7_T0CCP1); // PB7 as CCP1 pin
	//
	// Set the pin to use the internal pull-down.
	//
	ROM_GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_7,
			GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPD);
	//
	// Configure the timerB in downward edge count mode.
	//
	ROM_TimerConfigure(TIMER0_BASE, (TIMER_CFG_SPLIT_PAIR | TIMER_CFG_B_CAP_COUNT)); // Set up Timer0 split pair, Timer0B capture counter
	ROM_TimerPrescaleSet(TIMER0_BASE, TIMER_B,0xFF);	// Enable prescaler for 24bit counter mode, and load higher bits of timer initial count
	ROM_TimerControlEvent(TIMER0_BASE, TIMER_B, TIMER_EVENT_POS_EDGE); // Count down in positive edge
	ROM_TimerLoadSet(TIMER0_BASE, TIMER_B, 0xFFFF-1); // Load lower bits of timer initial count

	//
	// Enable the timer.
	//
	//
	ROM_TimerEnable(TIMER0_BASE, TIMER_B);
}