CROSS Technical Documentation User Manual and Technical Doc.
INFN Milano Bicocca
Loading...
Searching...
No Matches

◆ TIMER0_setup()

void TIMER0_setup ( void  )

Use of timer0 as a delay.

Returns
No Parameters
143void TIMER0_setup(void){
144 LPC_SC->PCONP |= 1; //Acensione timer0 (\'e gi\'a acceso, ma per sicurezza)
145 LPC_SC->PCLKSEL0 |= 1 << 2; //Clock = a quello della cpu
146 LPC_TIM0->PR = SystemCoreClock / TIMER0_freqeunza ; // 1 contenggio ogni 100 micros
147 LPC_TIM0 -> MCR |= TIM0_MR0I | TIM0_MR0S | TIM0_MR0R ; //Interrupt + reset conteggio e stop
148}
void TIMER0_setup(void)
Use of timer0 as a delay.
Definition: Timer.c:143
#define TIM0_MR0I
Abilitazione interrupt timer0.
Definition: Timer.h:10
#define TIM0_MR0R
Reset contatori timer0.
Definition: Timer.h:12
#define TIM0_MR0S
Stop al fondo scala timer0.
Definition: Timer.h:11

Definition at line 143 of file Timer.c.