Loop is executing infinite times
A while(1){} loop never exits, (unless you have a break inside) so it will always stick there. Why do you need the while(1) anyway? It looks like you are only reading once from the ADC.
If you do want to loop more than once, you need to add a condition to equal 0 when whatever it is you want to do inside has finished.