atmega161-4pi ATMEL Corporation, atmega161-4pi Datasheet - Page 152

no-image

atmega161-4pi

Manufacturer Part Number
atmega161-4pi
Description
8-bit Microcontroller With 16k Bytes Of In-system Programmable Flash
Manufacturer
ATMEL Corporation
Datasheet
Errata
ATmega161 Rev. E
152
ATmega161(L)
5. PWM not Phase Correct
4. Increased Interrupt Latency
3. Interrupt Return Fails when Stack Pointer Addresses the External Memory
2. Writing UBBRH Affects Both UART0 and UART1
PWM not Phase Correct
Increased Interrupt Latency
Interrupt Return Fails when Stack Pointer Addresses the External Memory
Writing UBBRH Affects both UART0 and UART1
Store Program Memory Instruction May Fail
In phase correct PWM mode, a change from OCRx = TOP to anything less than
TOP does not change the OCx output. This gives a phase error in the following
period.
Problem Fix/Workaround
Make sure this issue is not harmful to the application.
In this device, some instructions are not interruptable, and will cause the interrupt
latency to increase. The only practical problem concerns a loop followed by a two-
word instruction while waiting for an interrupt. The loop may consist of a branch
instruction or an absolute or relative jump back to itself like this:
loop: rjmp loop
<Two-word instruction>
In this case, a dead-lock situation arises.
Problem Fix/Workaround
In assembly, insert a nop instruction immediately after a loop to itself. The problem
will normally be detected during development. In C, the only construct that will give
this problem is an empty “for” loop; “for(;;)”. Use “while(1)” or “do{} while (1)” to avoid
the problem.
When Stack Pointer addresses external memory (SPH:SPL > $45F), returning from
interrupt will fail. The program counter will be updated with a wrong value and thus
the program flow will be corrupted.
Problem Fix/Workaround
Address the stack pointer to internal SRAM or disable interrupts while Stack Pointer
addresses external memory.
Writing UBRRHI updates baud rate generator for both UART0 and UART1. The
baud rate generator's counter is updated each time either UBRR or UBRRHI are
written. Since the UBRRHI regiSter is shared by UART0 and UART1, changing the
baud rate for one UART will affect the operation of the other UART.
Problem Fix/Workaround
Do not update UBRRHI for one UART when transmitting/receiving data on the
other.
1228D–AVR–02/07

Related parts for atmega161-4pi