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

LPC2148 ADC Interrupt doesn't get cleared...

Hello all, i am using lpc2148 in one of my application. i used adc conversion competition interrupt, so that no need to poll it. It works fine when first time it completes conversion of adc and execute ISR, but interrupt flag (ADINT) not get clears even i read all registers (ADDR,ADGDR,ADSTAT), so next time when adc conversion get complete, it does not jump to ISR.

Please help....

Parents
  • Delay in while(1) is because of the that when new instructions or other contain is added then it also work and it is for the purpose that we have to restart the conversion after getting the first interrupt and delay in is because of read/write delay of controller.....

    But the process of restarting the conversion depends on your application....sometimes it needs immediate some tile it needs after few seconds....

Reply
  • Delay in while(1) is because of the that when new instructions or other contain is added then it also work and it is for the purpose that we have to restart the conversion after getting the first interrupt and delay in is because of read/write delay of controller.....

    But the process of restarting the conversion depends on your application....sometimes it needs immediate some tile it needs after few seconds....

Children
  • Delayed restart of conversion really should not be implemented by hanging the ISR.

    The whole idea with ISR is to make sure that the ADC can perform the magic concurrently with normal software processing.

    Sometimes, it's enough to slow down the clock rate to the ADC to adjust the number of samples/second the ADC will manage. The next option is to have a timer ISR that decides when it's time to start a conversion. There are lots of options, but sleeping in an ISR is really not the recommended route to go since that hurts the reaction to other interrupts that happens to have a lower priority - or hurts all other ISR in case you don't allow nested interrupts.