avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] AT90CAN128 silicon bug in conjunction w/ external RAM


From: Henrik Maier
Subject: [avr-gcc-list] AT90CAN128 silicon bug in conjunction w/ external RAM
Date: Sat, 16 Apr 2005 09:45:20 +1000
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Hello,

in several threads in other forums I am discussing issues which turned
out to be caused by a silicon bug on the AT90CAN128 chip.

Refer to
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=149106#149106
and http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&theme=print&p=149108#149108.

The bug description sent to me in an email from Atmel is:
---[snip]-------------------------------------
Miss-functioning when code stack is in XRAM
If either an "IN" or an "OUT" instruction is executed just before an
interrupt occurs and if the stack pointer (SP) targets the XRAM, the
instruction is
executed twice. Because the other instructions are not from the same
class,
it seems that only "IN" and "OUT" instructions are concerned.

Problem Fix/Workaround
Map the code stack in SRAM.
---[snip]-------------------------------------

Atmel's fix/work around is not to place SP into XRAM. As for most
software projects this is a plausible workaround, it is not suitable
with some multi-threaded RTOS which place SP in dynamically allocated
heap memory.

Reading Atmel's explanation, I am wondering if another work around would
be not to use IN/OUT instructions at all.

Therefore I am asking the questions, is there a compiler switch or a
simple patch for avr-gcc to make it not use IN/OUT instructions and to
use LD/ST instructions only instead?

Regards

Henrik






reply via email to

[Prev in Thread] Current Thread [Next in Thread]