LPC1115 ADC Overrun Problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC1115 ADC Overrun Problem

780 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by btheuma on Wed Oct 21 08:14:35 MST 2015
I need to sample 6 ADC channels at a rate of 150Hz. I am using BURST mode for the 6 channels. BURST is activated by a timer interrupt at 150Hz. When the 6th conversion is ready, and ADC interrupt stops the BURST, so that BURST is only activated at a rate of 150Hz. However, when I enter the ADC interrupt(which means that the 6th conversion is ready), the OVERRUN flag is being marked as set (This bit is 1 in burst mode if the results of one or more conversions was (were) lost and overwritten before the conversion that produced the result).

Since an interrupt is being activated once the 6th conversion is ready, and this ADC interrupt stops the burst conversions, how is the overrun flag being set ? This way, BURST is only supposed to do the conversions once.


标签 (1)
0 项奖励
回复
1 回复

718 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Thu Oct 22 01:44:53 MST 2015
The next conversion of channel 1 has started already and will be completed, causing the overrun (yes, I also would like a single-burst mode that stops, but it isn't there).
So you can try to trigger your interrupt earlier, say on the next to last channel, and hope that the interrupt is fast enough.
A more robust method, and perfectly adequate at 150 Hz, is to use single conversion and trigger each channel separately, subsequent channels in the ADC interrupt. We use this for sampling 3 channels at 10kHz.
Or you could just determine that it is safe to ignore the overrun.
0 项奖励
回复