Hi Janos,
Sorry to reply a bit late. i just added these two lines to my code and it 
worked fine:
SET_BIT(DDRE,3); 
SET_BIT(PORTE,3);
if i implement McuPowerOverride.LowestState() , should I take care of the MCU 
power state for all my application features or just only the Timer 3 knowing 
that my code uses ADC and Radio?
Best regards 
Hafid
 


________________________________
De : Janos Sallai <sal...@isis.vanderbilt.edu>
À : hafid oussaadi <oussaadiha...@live.com>
Cc : tinyos help <tinyos-help@millennium.berkeley.edu>
Envoyé le : Lundi 14 Novembre 2011 22h46
Objet : Re: [Tinyos-help] Timer 3 registers and IRIS mote

Hafid,

Most probably, the MCU goes to sleep and the timer is not ticking. To
prevent the MCU from sleeping, implement the McuPowerOverride
interface and wire it to McuSleepC.

Janos

On Wed, Nov 9, 2011 at 10:05 PM, hafid oussaadi <oussaadiha...@live.com> wrote:
> Hello everybody,
> I wrote a  small program to generate a 16 KHz PWM signal on OC3A which
> corresponds to pin 26 on the IRIS 51 pins connector. Assuming that fclk_I/O
> = 7.3728 MHz ,  I use  CTC mode  with OCR3A as TOP value.
> PRR1 &=~(1 << 3); // enable Timer 3
> TCCR3B |= (1<<3)|(1<<0); // prescaler=1
> OCR3A=0xE0;  // top value
> TCCR3A=0x40 ;// CTC mode with OCR3A as TOP value
> TCCR3A &= ~(1 << 6); // stop the signal
> I don`t get anything as output. What`s wrong with this code?
> BTW, I am using  TimerMillic  to generate this signal for 10 seconds
> Regards
> Hafid
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help@millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>

_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to