Hi Everyone
I want ADC (single conversion) samples every 72usec. In my project i already have 1ms timer interrupts and UART interrupts at every 5ms or so and few other interrupts as well. I am not using DMA. ADC is triggered through PDB.
SIM_SCGC3 |= (SIM_SCGC3_ADC1_MASK);
ADC1_CFG1 = ADC_CFG1_MODE(0x02) | ADC_CFG1_ADICLK(0x01);
ADC1_CFG2 = ADC_CFG2_ADHSC_MASK;
ADC1_SC2 = ADC_SC2_ADTRG_MASK ;
ADC1_SC3 = ADC_SC3_CALF_MASK;
My problem: with ADC samples every 500usec and all other interrupts am getting expected behavior and halts at breakpoint in ADC interrupt routine. But when i change this period to less than 500 usec i.e 400usec or 300usec the observed behavior is unexpected; there are no halts in ADC interrupt routine.
I am suspecting that below 500usec period a large number of interrupts are being generated which is causing miss in servicing interrupts.
Would using DMA help me in capturing all the ADC samples?
Thanks