Home/Support/Support Forum/RCM6000, TimerB, Step/Match Interrupt
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

RCM6000, TimerB, Step/Match Interrupt

0 votes
Trying to get the Rabbit 6000 to run using the timerB step registers on the dev board for the RCM6700.
Example code

nodebug root interrupt void timerb_isr()
{
RdPortI(TBCSR); // clear interrupt by reading
// toggle bit PD0, flashes on dev board
WrPortI(PDDR,&PDDRShadow,PDDRShadow ^ 0x01);
ipres();
}


main(void){
// set up the PD0 on teh development board as output
BitWrPortI(PDDDR, &PDDDRShadow, 1, 0);
BitWrPortI(PDDCR, &PDDCRShadow, 0, 0);
BitWrPortI(PDFR, &PDFRShadow, 0, 0);

// install ISR routine
SetVectIntern ( 0x0B, timerb_isr ); // set ISR

// initialize Timer B and B1 step+match registers
WrPortI(TBCSR, NULL, 0x00);
WrPortI(TBSL1R, NULL, 0xFF);
WrPortI(TBSM1R, NULL, 0x00);
WrPortI(TBL1R, NULL, 0xFF);
WrPortI(TBM1R, NULL, 0x00);
WrPortI(TBCR , NULL, 0x11);
WrPortI(TBCSR, NULL, 0x03);

while(1);
}

The above causes the debugger times out.
asked Nov 17, 2014 in Rabbit Software by Henrik New to the Community (9 points)

Please log in or register to answer this question.

1 Answer

0 votes
Try running the programs in samples\timerB.

I would recommend writing the ISR in assembly as in the examples.

See the DC10 user manual, 13.6 Interrupt Routines in Assembly for more details.
answered Nov 17, 2014 by trooper2 Veteran of the Digi Community (589 points)
...