Other Parts Discussed in Thread: HALCOGEN,
Looking for input on two Errata's:
SYS#046: Clock Source Switching Not Qualified With Clock Source Enable And Clock Source Valid
The HalCoGen generated code has the workaround implemented in system.c mapClocks():
/* Work Around for Errata SYS#46:
*
* Errata Description:
* Clock Source Switching Not Qualified with Clock Source Enable And Clock Source Valid
* Workaround:
* Always check the CSDIS register to make sure the clock source is turned on and check
* the CSVSTAT register to make sure the clock source is valid. Then write to GHVSRC to switch the clock.
*/
/** - Wait for until clocks are locked */
SYS_CSVSTAT = systemREG1->CSVSTAT;
SYS_CSDIS = systemREG1->CSDIS;
while ((SYS_CSVSTAT & ((SYS_CSDIS ^ 0xFFU) & 0xFFU)) != ((SYS_CSDIS ^ 0xFFU) & 0xFFU))
{
SYS_CSVSTAT = systemREG1->CSVSTAT;
SYS_CSDIS = systemREG1->CSDIS;
} /* Wait */
Ran across one unit that was hung in the above loop. The PLL1 was not ever valid, i.e. PLL failed to start? This was NOT happening on every power on, but was repeatable.
Then found the other Errata: SSWF021#45 - PLL Fails to Start
This Errata provided code examples for the workaround that starts the PLL at a slower rate, then proceeds forward to configure the PLL as defined in HalCoGen (i.e. 220 MHz).
SPNA233A May 2016 revised Jun 2016 has this code placed in sys_startup.c _c_int00() after checking for a power on reset:
/* check for power-on reset condition */
/*SAFETYMCUSW 139 S MR:13.7 <APPROVED> "Hardware status bit read check" */
if ((SYS_EXCEPTION & POWERON_RESET) != 0U)
{
/* USER CODE BEGIN (12) */
if(_errata_SSWF021_45_both_plls(5) != 0)
{
routine_to_put_into_safe_fail_state();
}
/* USER CODE END */
Questions:
1) Anyone else experienced an issue with the PLL failing to start? If so, were you able to determine the issue and was it failing on the Errata SYS#046 workaround?
2) Any explanation (hopefully from a TI rep) why the PLL is failing to start? If it is a problem with the RM46x, why is this Errata workaround NOT generated by HalCoGen code like SYS#046?
3) TI recommendation for implementing workaround for SSWF021#45, the SPNA233A identifies timing for various reties up to 5 retries. Can more retries be used or is it recommended to try no more than 5 times?
I have not tried implementing this workaround yet, for the unit that had this issue is no longer showing the issue, we are still trying to reproduce again.
Thanks for any experiences or recommendations.
Don ...