Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Contributor II

I need to take an ADC reading at a specific point in received data stream from a wireless system.


First I dropped an SAR_ADC on the project and tested it worked using this code.






result = ADC_IsEndConversion(ADC_WAIT_FOR_RESULT);


RSSI_Val = ADC_GetResult16(); 


Next, I set a flag at the point in data reception I wanted to start sample and when I read the flag in main code I do an ADC sample. Trouble is that I do not have control over the point a packet arrives and therfore the sampling of the ADC is not always occurring when I need it.


Would someone have an example how I could start and ADC conversion within the Uart Interrupt routine so that when I get back in main loop the conversion would have been doen at the right time and I can read the value at that point?





13 Replies