This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

FIQ and IRQ

hello all,

i am doing project on LPC2378

I have one input pin on LPC2378 connected to some other assembly which has opto assembly connected to it

when ever opto is cut i.e whenever there is transition on opto signal to LPC2378, I take reading from ADC

I also have tick timer which is also running at interrupt of 100msec

thus for LCP2378, I have 2 interrupts,

timer interrupt which is tick timer as IRQ

input pin interrupt as FIQ (falling edge)

in FIQ interrupt I am polling for ADC busy status and taking the reading of ADC

I am taking 50 readings, My FIQ is working fine as I am able to take reading on every transition of opto signal

but out of 50, one reading is going out of range.

can you tell me if I am missing FIQ interrupt due to timer interrupt?

Please reply as I can discuss my code.

thanks

Parents
  • You are giving too little information. What do you mean "going out of range"? And do you take 50 values after one pin pulse? Or do you generate a burst of 50 pin pulses? And do you always get one bad sample out of 50?

    If you create two pulses too quick, then you might not have ended the first FIQ before the next pulse happens.

    Normally, it isn't good to let the interrupt handlers loop. A different solution is to have the pin interrupt just start a conversion and have a ADC interrupt to pick up the result when the conversion ends. And if you get a pin interrupt when the ADC is already busy then you would know and can just increment a counter telling you that you got two pin interrupts too close together.

Reply
  • You are giving too little information. What do you mean "going out of range"? And do you take 50 values after one pin pulse? Or do you generate a burst of 50 pin pulses? And do you always get one bad sample out of 50?

    If you create two pulses too quick, then you might not have ended the first FIQ before the next pulse happens.

    Normally, it isn't good to let the interrupt handlers loop. A different solution is to have the pin interrupt just start a conversion and have a ADC interrupt to pick up the result when the conversion ends. And if you get a pin interrupt when the ADC is already busy then you would know and can just increment a counter telling you that you got two pin interrupts too close together.

Children