I have been writing a program for the FRDM-KV31f board with MCUXPRESSO to derive the clock using the reference manual. In the program I have to loop till a certain bit is set which I am doing with the help of a bitwise operator and a mask. But the program gets stuck in these loops. I am pretty sure that there is some issue with the check condition that I have provided but am not able to figure out what exactly is. Please check the attached and help with the same.