Hello,
I am using functions checkClockMonitor(), checkPLL1Slip() and checkPLL2Slip() generated by halcogen. For safety reasons we can not have while() loops which are just waiting for a bit to change (in case of a hardware error, if the bit never changes it would be an infinite loop). For that reason I need to know the maximum wait time for all while() loops in the previous mentioned functions.
checkPLL1Slip()
1) Maximum time needed for the PLL slip flag to be set. /* Wait till PLL slip flag is set */ while((systemREG1->GBLSTAT & 0x300U) == 0U)
2) Maximum time needed until PLL1 is disabled /* Wait till PLL1 is disabled */ while((systemREG1->CSDIS & 0x2U) == 0U)
3) Maximum time needed until PLL1 is enable again while((systemREG1->CSDIS & 0x2U) != 0U)
checkPLL2Slip()
1) Maximum time until ESM error is signaled after a PLL2 slip while((esmREG->SR4[0U] & 0x400U) != 0x400U)
I have removed this loop and function is working properly. Is it correct to assume that this time is 0 or at least below 1 cycle?
2) Maximum time needed until PLL2 is disabled while((systemREG1->CSDIS & 0x40U) == 0U)
3) Maximum time needed until PLL2 is enabled again. while((systemREG1->CSDIS & 0x40U) != 0U)
checkClockMonitor()
1) Maximum time needed until oscillator flag is set while((systemREG1->GBLSTAT & 0x1U) == 0U)
2) Maximum time needed until oscillator is enabled again while((systemREG1->CSVSTAT & 0x3U) == 0U)
Thanks for you help,
Francis.