Bei meinem ARM9 Samsung S3C2410 erfolgt die Vergabe der Startadresse des
Framebuffers mit Hilfe des LCDSADR1 Registers:
LCDBANK [29:21]
These bits indicate A[30:22] of the bank location for the video buffer
in
the system memory. LCDBANK value cannot be changed even when
moving the view port. LCD frame buffer should be within aligned 4MB
region, which ensures that LCDBANK value will not be changed when
moving the view port. So, care should be taken to use the malloc()
function.
LCDBASEU [20:0]
These bits indicate A[21:1] of the start address of the LCD frame
buffer.
Das Register LCDSADR2 Register legt das Ende des Framebuffers fest:
LCDBASEL [20:0]
These bits indicate A[21:1] of the end address of the LCD frame buffer.
LCDBASEL = ((the fame end address) >>1) + 1
= LCDBASEU + (PAGEWIDTH+OFFSIZE)x(LINEVAL+1)
Weiterhin werden fuer die Konfiguration das LCDSADR3 benoetigt:
OFFSIZE [21:11]
Virtual screen offset size (the number of half words).
This value defines the difference between the address of the last half
word displayed on the previous LCD line and the address of the first
half word to be displayed in the new LCD line.
PAGEWIDTH [10:0]
Virtual screen page width (the number of half words).
This value defines the width of the view port in the frame.
Nun verstehe ich nicht wie die Register vor allem LCDBASEU und LCDBASEU
belegt werden sollen. Das von Samsung angegebene Beispiel bringt mich
leider auch nichtr weiter:
Example 1. LCD panel = 320*240, 16gray, single scan
Frame start address = 0x0c500000
Offset dot number = 2048 dots ( 512 half words )
LINEVAL = 240-1 = 0xef
PAGEWIDTH = 320*4/16 = 0x50
OFFSIZE = 512 = 0x200
LCDBANK = 0x0c500000 >> 22 = 0x31
LCDBASEU = 0x100000 >> 1 = 0x80000
LCDBASEL = 0x80000 + ( 0x50 + 0x200 ) * ( 0xef + 1 ) =
0xa2b00
Besten Dank fuer jede Hilfe.
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.