SAM3/4: Loop counter for PLL delay must be volatile or it may get optimized away
This commit is contained in:
parent
2bce348e0f
commit
f7edd7a31c
|
@ -151,7 +151,8 @@ static inline void sam_supcsetup(void)
|
|||
|
||||
static void sam_pmcwait(uint32_t bit)
|
||||
{
|
||||
uint32_t delay;
|
||||
volatile uint32_t delay;
|
||||
|
||||
for (delay = 0;
|
||||
(getreg32(SAM_PMC_SR) & bit) == 0 && delay < UINT32_MAX;
|
||||
delay++);
|
||||
|
|
Loading…
Reference in New Issue