Forum: Mikrocontroller und Digitale Elektronik AT90CAN128: Map the code stack in internal SRAM ?


von Kim (Gast)


Lesenswert?

Hallo,

im Datenblatt zum AT90CAN128 steht folgendes:

Miss-functioning when code stack is in XRAM
If the stack pointer (SP) targets the XRAM and if the execution of an 
instruction is split to serve a rising interrupt, the last operation of 
this instruction, executed after pushing out the return address from 
XRAM, may be disturbed providing wrong data to the system. Example: - 
the “OUT” instruction can be executed twice
- the “MOV” instruction can update a register with un-predictable data.

Problem fix / workaround
Map the code stack in internal SRAM.

Mir ist nicht ganz klar, was da zu tun ist.

Gruß
Kim

von Frank K. (fchk)


Lesenswert?

Packe den Stack ins interne RAM, nicht ins externe, falls Du welches 
haben solltest. Dafür gibts Compilersettings bzw Linker Control Files.

fchk

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.