We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I am developing a prototype using the CC2430 evaluation boards. I need to test the lowest time period that i can count using a timer. I set the CC2430 system clock to 32MHz, timer tick period = 32MHZ and am running Timer1 at 32MHz (prescaler = 0). The Lowest interval period i could acieve was about 1600ns.
I expected to get a much better resolution since TI specifies that most instructions are 1 cycle, and also the minimum interrupt delay is 7cycles. Since i have not enabled any other interrupts except timer1 Channel, i dont see why i shud compromise with 1.6us.
Thanks in advance for your time advice.
Cheers, Lewis
Plz: I am using IAR embedded workbench
Hi Erik, Thanks for replying . Please find below my source code
////////////////////////////////////////////// int main( void ) {
P1DIR |= 0x01;
SLEEP &= ~ (0x03 + 0x04) ;// poweer mode 0, both oscillators powered up
for(int i =0; i<0xFFFF; i++)
{}//wait for osc to stabilize
CLKCON = 0; // 32K crsyt, 32MHz sys clock, Tickspeed 32MHz
T1CTL = 0x02;//Timer1 running upto T1CC0
T1CC0L = 32 ; // 32 * 31.25ns = 1.0 us - channel 0 compare cnt
T1CC0H = 0;
//TIMIF |= 0x40;//enable timer1 overflow interrupt
T1CCTL0 = (0x40 + 0x04); //enable Timer1 compare interrpts , compare mode on channel 0
T1IE = 1; //enable timer1 Interrots
EA = 1;
while(1)
{}
}
#pragma vector=T1_VECTOR
__interrupt void my_interrupt_handler(void)
{
if(T1CTL & 0x20) //timer 1 channel0 interrupt
P1 ^=0x01;
//////////////////////////////////////////////
I dint understand the meaning of 'RCAP load'
Thanks for your time and advice Cheers, Lewis
strange beast you have (not that necessarily is wrong)
I dint understand the meaning of 'RCAP load' have a look at any timer 2 in a 'regular' '51.
Your chip,evidently is so far from the norm that I can not help any without diving into the datasheet, unfortiunately time does not permit that.
let's hope somebody familiar with your chip comes to teh reescue.
Erik