Skip to content
Snippets Groups Projects
Commit b423f940 authored by Olav Morken's avatar Olav Morken Committed by Haavard Skinnemoen
Browse files

AVR32: Must add NOPs after disabling interrupts for AT32UC3A0512ES


The AT32UC3A0512ES chip has a bug when disabling interrupts. As a
workaround, two NOPs can be inserted.

Signed-off-by: default avatarGunnar Rangoy <gunnar@rangoy.com>
Signed-off-by: default avatarPaul Driveklepp <pauldriveklepp@gmail.com>
Signed-off-by: default avatarOlav Morken <olavmrk@gmail.com>
Signed-off-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
parent f5f652fa
No related branches found
No related tags found
No related merge requests found
...@@ -35,5 +35,12 @@ int disable_interrupts(void) ...@@ -35,5 +35,12 @@ int disable_interrupts(void)
sr = sysreg_read(SR); sr = sysreg_read(SR);
asm volatile("ssrf %0" : : "n"(SYSREG_GM_OFFSET)); asm volatile("ssrf %0" : : "n"(SYSREG_GM_OFFSET));
#ifdef CONFIG_AT32UC3A0xxx
/* Two NOPs are required after masking interrupts on the
* AT32UC3A0512ES. See errata 41.4.5.5. */
asm("nop");
asm("nop");
#endif
return !SYSREG_BFEXT(GM, sr); return !SYSREG_BFEXT(GM, sr);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment