Feb 05, 2016
07:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 05, 2016
07:32 AM
Hi all,
IMO checking PROTS after unlocking is useless and dangerous: If an interrupt (taking more than 32 MCLK cycles) happens after unlocking, the funcion will wait forever.
Any idea what the author wanted to achieve with the PROTS query?
Oliver
void XMC_SCU_UnlockProtectedBits(void)
{
SCU_GENERAL->PASSWD = SCU_GCU_PASSWD_PROT_DISABLE;
while(((SCU_GENERAL->PASSWD) & SCU_GENERAL_PASSWD_PROTS_Msk))
{
/* Loop until the lock is removed */
}
}
IMO checking PROTS after unlocking is useless and dangerous: If an interrupt (taking more than 32 MCLK cycles) happens after unlocking, the funcion will wait forever.
Any idea what the author wanted to achieve with the PROTS query?
Oliver
- Tags:
- IFX
2 Replies
Feb 10, 2016
12:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 10, 2016
12:06 AM
If i remember correctly, after 32 clock cycles it will go back to LOCK state.
Feb 10, 2016
02:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 10, 2016
02:13 AM
Hello Travis,
please read again my posting: " If an interrupt (taking more than 32 MCLK cycles) happens after unlocking, the function will wait forever."
please read again my posting: " If an interrupt (taking more than 32 MCLK cycles) happens after unlocking, the function will wait forever."