Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi
I'm currently using both simon's ADC_test code (http://mbed.org/users/simonb/programs/ADC_test/5zlnn/docs/) as well as the mbed AnalogIn lib The code calling Simons lib is
ADC adc(SAMPLE_RATE,1); ... PinName p = ndx==0?p19:p20; adc.setup(p, 1); adc.select(p); //Start ADC conversion adc.start(); //Wait for it to complete while (!adc.done(p)); int value = adc.read(p); printf("Raw=0x%4.4X\r\n", value); adc.setup(p, 0);What I notice is that use AnalogIn calls, then use Simons lib but after that each subsequent call to AnalogIn fails (mbed hangs until reset).
The same happens with my timer1/mat based code. After a single call to that both simons lib and AnalogIn fail by hanging.
Any suggestions where the two bite each other?