never return 0 frequency or phase. 0 means there was no time for calculation, 1 means there was an error
better processing loop
added wait slots