Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Changing VRAM size and location
PostPosted: Tue Mar 16, 2010 6:01 am 
Offline

Joined: Wed Nov 25, 2009 4:15 am
Posts: 18
Hi,

I'm trying to get my custom at91sam9263 board to run an 800x600 display. I've changed the registry settings to what I think should be the correct values, however when WinCE starts up I get a lot of errors of the form:

Code:
Exception 'Data Abort' (4) Thread-Id=01f...


I'm guessing it's got something to do with the way I've set up the video RAM. Is there something else I need to do as well as changing the address in the registry? I've attached my lcdc.reg file:

Code:
[HKEY_LOCAL_MACHINE\System\GDI\ROTATION]
   "Angle"=dword:5A


; Video driver settings
[HKEY_LOCAL_MACHINE\Drivers\Display\LCDC]
;800x600x16
   "Width"=dword:320              ; Screen width in pixel
   "Height"=dword:258             ; Screen heigth in pixel
   "Bpp"=dword:10                 ; Bit per pixel
   "VRAMWidthInPixel"=dword:1000   ; Frame buffer width in pixel (must be at least screen width value and also must match the 2DGE settings. keeping it aligned on 4 bytes allows not to care about the later)
   "VRAMHeightInPixel"=dword:400 ; Frame buffer heigth in pixel (must be at least screen height and more than twice for directdraw)
   "VRAMaddress"=dword:23800000    ; Frame buffer location. Here allocate the video memory in SDRAM
   "VRAMBusWidth"=dword:20         ; SDRAM has a 32-bits bus width
;   "VRAMaddress"=dword:300000      ; allocate the video memory in SRAM
;   "VRAMBusWidth"=dword:20         ; SRAM has a 32-bits bus width
;   "VRAMaddress"=dword:70000000   ; allocate the video memory in external PSRAM
;   "VRAMBusWidth"=dword:10         ; external PSRAM has a 16-bits bus width
   "DisplayPowerClass"=multi_sz:"{EB91C7C9-8BF6-4a2d-9AB8-69724EED97D1}"
;   "forceRGB"=dword:1           ; uncomment this line if you want to use DirectDraw,
                                ; be careful, the color will be shifted
   
   "UpperMargin"=dword:19          ; Value for Vertical Back Porch
   "LowerMargin"=dword:1          ; Value for Vertical Front Porch
   "LeftMargin"=dword:58           ; Value for Horizontal Back Porch
   "RightMargin"=dword:28         ; Value for Horizontal Front Porch
   "Vsync"=dword:3                ; Value for Vertical Synchronization pulse width
   "Hsync"=dword:80                ; Value for Horizontal synchronization pulse width
   "PixelClock"=dword:2625A00      ; The pixel clock wanted

[HKEY_LOCAL_MACHINE\system\gdi\monitors]
   "TOTAL MONITORS"=dword:1

[HKEY_LOCAL_MACHINE\System\GDI\Drivers]
    "Display"="at91sam9263ek_DDI.dll"


Top
 Profile  
 
 Post subject: Re: Changing VRAM size and location
PostPosted: Tue Mar 16, 2010 9:38 am 
Offline

Joined: Wed Nov 25, 2009 4:15 am
Posts: 18
I've got past this - changed both VRAM width and height to 0x400 to keep the address the same as before (based on the AT91SAM9263-EK).

I'm having problems with the pixel clock - it should be 40MHz, but I'm measuring it as 30MHz, and it's not going rail to rail, it seems to have a very slow slew rate. Is there slew rate control on this pin?


Top
 Profile  
 
 Post subject: Re: Changing VRAM size and location
PostPosted: Wed Mar 17, 2010 5:03 am 
Offline

Joined: Wed Nov 25, 2009 4:15 am
Posts: 18
Ok, I've solved some of my problems, and I'll list them here in case it helps others:

- The pixel clock slew rate problem wasn't a problem, it was the my CRO probes, i guess they had too much capacitance at 1x. The clock looks fine with a 10x probe.
- The pixel clock frequency wasn't correct because my master clock wasn't an even multiple of it. I'm now running a 50MHz pixel clock from a 100MHz master clock.
- My display is working at 800x600x16bpp after I figured out how to enable VSYNC - the pin needs to be configured properly in the LCDC driver.

I'd still like to know how to increase the size of the frame buffer so I can try 24bit colour.


Top
 Profile  
 
 Post subject: Re: Changing VRAM size and location
PostPosted: Mon Apr 12, 2010 8:56 am 
Offline

Joined: Tue Mar 31, 2009 7:22 am
Posts: 23
You can increase the size of VRAM by increasing values of "VRAMWidthInPixel" and "VRAMHieightInPixel", also modify the value of "VRAMaddress" accordingly.

Besides, you also need to edit Config.bib file and make sure the setting of segement "VIDEOMEM" is the same as what you set in registry.


Top
 Profile  
 
 Post subject: Re: Changing VRAM size and location
PostPosted: Tue Apr 13, 2010 8:03 am 
Offline

Joined: Wed Nov 25, 2009 4:15 am
Posts: 18
Yeah, I wasn't changing Config.bib, so the memory organisation didn't match the numbers in lcdc.reg


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: