Rockbox Development > New Ports
Cowon D2
FranzD2:
--- Quote from: shotofadds on October 05, 2008, 10:15:09 AM ---This "cut and repeated lines" problem only seems to happen when the bootloader is used to run the main Rockbox binary (it doesn't seem to happen if Rockbox is booted using tcctool). So it's likely to be provoked by the main Rockbox binary trying to initialise the LCD a 2nd time...
--- End quote ---
In my boot screen i even see the top two lines cut off so the problem is in the first LCD initialization, i'll try to test some bit configuration as you said, unfortunately the datasheet is very poor of infos on the meaning of each bit (what values can take R3???), however i'll do some trying, thanks for your reply!
FranzD2:
I found the problem that was causing that "two lines cut and then repeated at the bottom",
first of all, i had to set the value of R06 (to be exact it is the value of the Vertical BachPorch) to 0x1 instead of 0x4 (Don't know why but let me know if this could cause problems, i don't think so) and then i inserted some sleep_ms() call into the spi command write routine ltv250qv_write(), right after the
GPIOA_CLEAR = LTV250QV_CS;
and just before the
GPIOA_SET = LTV250QV_CS;
I put a "sleep_ms(20);"
I think that this problem was due to some timing stuff related to the spi hardware which has been resolved just by inserting a small delay.
If someone feels inspired, please try this fix and let me know...
shotofadds:
Well, that makes perfect sense. It does indeed look like two distinct problems:
1. An incorrect "vertical back porch" value could certainly cause the missing lines. This would apply to the bootloader and main Rockbox equally.
2. In the bootloader, lcd_init() is called while the cpu is unboosted, but main.c first calls cpu_boost(true). This means the CPU is running 4x faster when lcd_init() is called the 2nd time.
I'll do some testing to find the optimum wait time necessary (20ms is likely to be several orders of magnitude more than necessary!) and then commit a fix.
Thanks for looking into this - if you let me know your real name I'll add you to the CREDITS file.
EDIT: Using a vertical back porch value of 0x1 fixed the missing lines at the top, but caused a missing line at the bottom. A value of 0x2 works better for me - does this work for you as well?
wnmnkh:
shotofadds, I begin to suspect that the NAND read/writing driver for SD is broken even in the official firmware.
I used a lot of writing and deleting on my 8gb card using my D2, not a card reader. Currently, the card is corrupted and the firmware is unable to read the files correctly. Maybe this is my own, unique case only, but I just can't stop thinking about the connection between buggy file access and this problem.
shotofadds:
@wnmnkh: I very much doubt these problems are related. The Rockbox file access is "buggy" because we dont understand enough about the NAND Flash Translation Layer (although I'm working on that right now...), so that won't affect SD at all.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version