AnsweredAssumed Answered

TIMER MODE WDTH_CAP MODE on BF548

Question asked by SLA on Jun 16, 2011
Latest reply on Jun 20, 2011 by SLA

Hi,

 

I try to run TIMER in WDTH MODE and I have no success. I did as following, could you please advice what I did wrong.

int status=0;

void main(void){

*pPORTA_FER =Px5;
*pPORTA_MUX = MUX1;
ssync();

*pTIMER5_CONFIG =  0x001E; 
*pTIMER_ENABLE0 = TIMEN5

*pSIC_IMASK2 = ( 0x8000000);
register_handler(ik_ivg11,timer);


while(1)

{if (status)(printf("OK\n"));}

 

}

 

EX_INTERRUPT_HANDLER(timer)
{
*pTIMER_DISABLE0  =  0x0001;  //Disabilg timer
*pSIC_IMASK2 = 0x00000000;
   ssync();
  status=1;
}

Regards

Slawek

Outcomes