http://qiita.com/7of9/items/ace300523ac2521237b7
で気になったPrescalerについて。
XTtcPs_SetPrescaler(&ttcInst, tmrSetup->Prescaler);
にてtmrSetupでセットしたPrescaler値が使われている。
XTtcPs_SetPrescaler()は以下で実装とコメントが見つかった。
/*****************************************************************************/
/**
*
* This function sets the prescaler enable bit and if needed sets the prescaler
* bits in the control register.
*
* @param InstancePtr is a pointer to the XTtcPs instance.
* @param PrescalerValue is a number from 0-16 that sets the prescaler
* to use.
* If the parameter is 0 - 15, use a prescaler on the clock of
* 2^(PrescalerValue+1), or 2-65536.
* If the parameter is XTTCPS_CLK_CNTRL_PS_DISABLE, do not use a
* prescaler.
*
* @return None
*
* @note None
*
****************************************************************************/
void XTtcPs_SetPrescaler(XTtcPs *InstancePtr, u8 PrescalerValue)
{
- 0から16の値が使える