GP32 Envid Bit In Lcdcon1 Problem


velvetfr

Still Fresh
Joined
Nov 17, 2003
Messages
22
Age
49
Location
Croydon, London
Website
velvetfr.ath.cx
Hi all,

I am confronted against a problem on GP32 when trying to disable and enable the video output through the ENVID bit of the LCDCON1 register. When setting the bit to 0, the output is disabled, and apparently it is working (the screen is like frozen, which is normal), but when putting back this bit to 1, the screen is then re-enabled but seems to have like a refresh problem (a lot of disturbances are occuring on the screen).

Is someone has already expereinced that, or someone have the solution around that problem ?

Thanks in advance,
velvetfr
 
Hi all,

I am confronted against a problem on GP32 when trying to disable and enable the video output through the ENVID bit of the LCDCON1 register. When setting the bit to 0, the output is disabled, and apparently it is working (the screen is like frozen, which is normal), but when putting back this bit to 1, the screen is then re-enabled but seems to have like a refresh problem (a lot of disturbances are occuring on the screen).

Is someone has already expereinced that, or someone have the solution around that problem ?

Thanks in advance,
velvetfr
never set the LCD screen of with the ENVID bit, it could destroy your TFT screen.
( sawn in official gp32 doku )

Why should someone disable and enable the screen ?
If you want to switch between different screen buffers, you can do it, without
it.
 
Last edited by a moderator:
Hi,

seems that I have some clock problem ... I have to review my basic functions re. the clock calculations. Are there any FAQs or simple documentation re. the clock settings ?

Also, do not see how playing with this bit could destroy the TFT screen. Can others people confirm this fact ? ... so also why GP delivered GPLCDEnable and GPLCDDisable functions, which simply play with this bit ?

Thanks,
velvetfr
 
Hi,

that will conclude this thread. I have a macro not well defined :
# define LCDCON1_SETCLKVAL(x) ((uint32)(((x) << 18) & LCDCON1_CLKVAL_MSK))

but shall be :
# define LCDCON1_SETCLKVAL(x) ((uint32)(((x) << 8) & LCDCON1_CLKVAL_MSK))

Thanks ...
velvetfr
 
int GpLcdEnable ( void )
int GpLcdDisable ( void )
Overview : Enable or disable the video signals to GP32 LCD. Be careful because when they are disabled over a long period of time with the power on, it can shorten the life of LCD or affect the screen quality.
That's the statement that has always put people off using those two functions. I don't know if anyone has ever tried turning off the lcd for long periods of time to see if it is actually true.
 
Hi,

that will conclude this thread. I have a macro not well defined :
# define LCDCON1_SETCLKVAL(x) ((uint32)(((x) << 18) & LCDCON1_CLKVAL_MSK))

but shall be :
# define LCDCON1_SETCLKVAL(x) ((uint32)(((x) << 8) & LCDCON1_CLKVAL_MSK))

Thanks ...
velvetfr
This is the CLKVAL calculation from my SDK:

u32 GPHCLK = gp_getHCLK();
u16 CLKVAL = (GPHCLK/(83385*2*refreshrate))-1;
if (CLKVAL == 0) CLKVAL=1;

HCLK depends on your cpu clock.

See SDK replacement for more deteils : http://mirkoroller.de/gp32
 
Last edited by a moderator:
Back
Top