Hallo. Ich arbeite an einem Simulator für die ATMega Familie, der von einem Model Checker benutzt wird. Wir liegen zur Zeit in den letzen Zügen, jedoch komme ich nun auf ein Problem zurück, dass ich damals zurückgestellt habe: Auf Seite 250 der vollständigen ATMega16 Dokumentation ist das SPMCR erklärt, jedoch wird der begriff "page load" benutzt, ohne genau definiert zu sein. Das RWWSB wird bei einem "page load" automatisch gecleared, außerdem verhindert das schreiben des RWWSRE eine "flash load operation", deren Daten dann verloren gehen. Das ganze macht für mich wenig Sinn, da LPM (so wie ich es verstanden habe) atomar abläuft. Ist damit das dekodieren der Befehle gemeint? Ich würde diese Sonderfälle gerne in den Simulator einbeziehen, um die Simulation so genau wie möglich zu gestalten. Ein paar klärende Worte zu diesen Seiteneffekten wären sehr nett. MfG Volker Kamin RWTH Aachen Lehrstuhl Informatik 11 - Software für eingebettete Systeme Ahornstraße 55 52074 Aachen fon: +49 241 80 21166 mail: volker.kamin@ixi.informatik.rwth-aachen.de web: http://www-i11.informatik.rwth-aachen.de
Aha. Genau beobachtet : When a self-programming (Page Erase or Page Write) operation to the RWW section is initiated, the RWWSB will be set (one) by hardware. When the RWWSB bit is set, the RWW section can-not be accessed. The RWWSB bit will be cleared if the RWWSRE bit is written to one after a Self-Programming operation is completed. Alternatively the RWWSB bit will automatically be cleared if a page load operation is initiated. Koennte damit eine LPM operation gemeint sein ?
Ah ok. Das macht jetzt ein wenig Sinn. Also wenn die SPM-Operation fertig ist reaktiviert ein LPM in der RWW-Section diese. Aber: Was passiert mit LPM, wenn die SPM noch läuft? Was passiert, wenn die RWW-Section noch busy ist, der PC aber genau dahin wandert? Ist denn nirgendwo definiert was ein "page-load" sein soll? MfG Volker Kamin RWTH Aachen Lehrstuhl Informatik 11 - Software für eingebettete Systeme Ahornstraße 55 52074 Aachen fon: +49 241 80 21166 mail: volker.kamin@ixi.informatik.rwth-aachen.de web: http://www-i11.informatik.rwth-aachen.de
Die RWW sektion kann wie der Name sagt, ein Read-While-Write machen. Aber die NRWW sektion kann das nicht, heisst ja auch No-Read-While-Write. Bei der NRWW sektion stopt der Prozessor bis die Write operation beendet ist. Es gibt 2 Lese Operationen : Das Ausfuehren von Code und die Page load operation. Die Page load operation ist meines Erachtens die LPM : "Load page memory".
@1354 Danke für die Erklärung von NRWW und RWW. Danach habe ich zwar nicht gefragt und wusste es auch schon, aber zumindest ist es richtig ;-) Was nicht richtig ist, ist die Annahme LPM hieße "Load page memory". Laut Seite 91 der AVR-Befehlssatz-Doku heitß LPM "Load Program Memory". Damit bleiben die Fragen meines 2. Posts leider unbeantwortet? Hatte denn tatsächlich noch niemand dieses Problem? MfG Volker Kamin RWTH Aachen Lehrstuhl Informatik 11 - Software für eingebettete Systeme Ahornstraße 55 52074 Aachen fon: +49 241 80 21177 (<- neu) mail: volker.kamin@ixi.informatik.rwth-aachen.de web: http://www-i11.informatik.rwth-aachen.de
P.S.: LPM läd nur ein einziges Byte des Program Memories. Daher auch meine Zweifel daran, dass dies der gesuchte "page load" sein könnte. MfG Volker Kamin RWTH Aachen Lehrstuhl Informatik 11 - Software für eingebettete Systeme Ahornstraße 55 52074 Aachen fon: +49 241 80 21177 (<- neu) mail: volker.kamin@ixi.informatik.rwth-aachen.de web: http://www-i11.informatik.rwth-aachen.de
Hallo, viielicht hilft die das weiter: Auf Seite 307 des ATMEGA128 Datenblattes steht unter den JTAG-Commandos der folgende Abschnitt: (SPMCR wurde beim Mega128 in SPMCSR umgetauft) MfG Willi
1 | PROG_PAGELOAD |
2 | ($6) |
3 | The AVR specific public JTAG instruction to directly load the Flash data page via the JTAG port. |
4 | The 2048-bit Virtual Flash Page Load Register is selected as data register. This is a virtual scan |
5 | chain with length equal to the number of bits in one Flash page. Internally the Shift Register is 8- |
6 | bit. Unlike most JTAG instructions, the Update-DR state is not used to transfer data from the |
7 | Shift Register. The data are automatically transferred to the Flash page buffer byte by byte in the |
8 | Shift-DR state by an internal state machine. This is the only active state: |
9 | • Shift-DR: Flash page data are shifted in from TDI by the TCK input, and automatically |
10 | loaded into the Flash page one byte at a time. |
11 | Note: The JTAG instruction PROG_PAGELOAD can only be used if the AVR device is the first device in |
12 | JTAG scan chain. If the AVR cannot be the first device in the scan chain, the byte-wise programming |
13 | algorithm must be used. |
14 | PROG_PAGEREAD |
15 | ($7) |
16 | The AVR specific public JTAG instruction to read one full Flash data page via the JTAG port. |
17 | The 2056-bit Virtual Flash Page Read Register is selected as data register. This is a virtual scan |
18 | chain with length equal to the number of bits in one Flash page plus 8. Internally the Shift Register |
19 | is 8-bit. Unlike most JTAG instructions, the Capture-DR state is not used to transfer data to |
20 | the Shift Register. The data are automatically transferred from the Flash page buffer byte by |
21 | byte in the Shift-DR state by an internal state machine. This is the only active state: |
22 | • Shift-DR: Flash data are automatically read one byte at a time and shifted out on TDO by the |
23 | TCK input. The TDI input is ignored. |
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
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.