AT32UC3B0512-A2UES ATMEL [ATMEL Corporation], AT32UC3B0512-A2UES Datasheet - Page 86

no-image

AT32UC3B0512-A2UES

Manufacturer Part Number
AT32UC3B0512-A2UES
Description
32-bit AVR Microcontroller
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
10. RETE instruction does not clear SREG[L] from interrupts
11. Exceptions when system stack is protected by MPU
The RETE instruction clears SREG[L] as expected from exceptions.
Fix/Workaround
When using the STCOND instruction, clear SREG[L] in the stacked value of SR before
returning from interrupts with RETE.
RETS behaves incorrectly when MPU is enabled and MPU is configured so thatsystem
stack is not readable in unprivileged mode.
Fix/Workaround
Workaround 1: Make system stack readable in unprivileged mode,
or
Workaround 2: Return from supervisor mode using rete instead of rets. This requires: 1.
Changing the mode bits from 001b to 110b before issuing the instruction.
Updating the mode bits to the desired value must be done using a single mtsr instruction so
it is done atomically. Even if this step is described in general as not safe in the UC technical
reference guide, it is safe in this very specific case.
2. Execute the RETE instruction.

Related parts for AT32UC3B0512-A2UES