Capture Register 0

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Capture Register 0

489件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by taoufik on Thu Sep 09 07:06:32 MST 2010
Hello,
I want to get the value of the TC when the level of the PIO1_8 changes, the interrupt is working when the level change but the value of the TC is always 0.. What am i doing wrong??
Thank you.
Taoufik

/*****************************/
unsigned int temTCval = 0;

void TIMER16_1_IRQHandler(void)
{
  temTCval = TMR16B1CR0;
  TMR16B1IR |= 0x10;
 
}

void initIRR_module(void){
 
  SYSAHBCLKCTRL |= (1<<SYSAHBCLKCTRL_CT16B1_BIT);
 
  //init io CT16B1_CAP0
  IOCON_PIO1_8 = 1;

  TMR16B1CTCR |= 1;
  TMR16B1CCR = 7;

  /* Enable the TC Interrupt */
  ctl_unmask_isr(17);
 
}
0 件の賞賛
返信
1 返信

479件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu Sep 09 09:35:43 MST 2010
Perhaps:

volatile unsigned int temTCval = 0;

or enable TC1:

TMR16B1TCR =1;
0 件の賞賛
返信