Take a look at the PWM.1 Errata. I did not see LPC2129 Erratasheet
on the web, but bug should be the same as published in Erratasheets
for other members of this family.
--- In lpc2000@yahoogroups.com, dasbento@a... wrote:
> Hello group,
>
> I have one problem in capture of PWM, i.e, sometimes exist missing
the
> capture of PWM.
> I'm using the LPC2129!!
>
> My interrupt function is the following
>
>
>
>
> void capture (void) {
>
>
> if(T1IR & TIR_CR0I){ //interrupt no chanel0 (eixo
dos xx)
> T1IR = TIR_CR0I;
>
> acel_cap_eixo_x();
>
>
> }
>
> if(T1IR & TIR_CR1I){ //interrupt no chanel1 (eixo
dos yy)
> T1IR = TIR_CR1I;
>
> acel_cap_eixo_y();
>
>
> }
>
> if(T1IR & TIR_CR2I){ //interrupt no chanel2 (eixo
dos zz)
> T1IR = TIR_CR2I; //clear flag interrupt
> acel_cap_eixo_z();
>
>
> }
>
> VICVectAddr = 0xFFFFFFFF;
> }
>
>
> void acel_cap_eixo_x(void){
> u32 tpu;
>
> if(IOPIN0 & ACEL_asc_x){ //verify if rising edge
> tpu=T1CR0;
> INS_ACEL_write(0, ((ACEL_T2_x-ACEL_T1_x)<<12)/(tpu-
ACEL_T1_x));
> ACEL_T1_x=tpu;
>
> }else{ //falling edge
> ACEL_T2_x = T1CR0;
> }
> return;
> }
>
>
>
> Someone has some suggestion for this problem!!!
>
>
> Thanks
> Domingos
> _________________________________________________________
> CEAC Cursos de formação profissional - peça informações aqui.:
> http://ceac.online.pt/Message
Re: capture pwm missing
2005-04-26 by lp2000c
Attachments
- No local attachments were found for this message.