Hi, I'm using the LG32 and wish to use GPIO pins as full complementary driver. According to the LG32 manual:
"Pins that have shared function with the LCD have special behavior based on the state of the VSUPPLY bits in the LCDSUPPLY register. These pins (PTA, PTB, PTC[4:0], PTD, PTE and PTG) can operate as full complementary drive or open drain drive depending on the VSUPPLY bits. When VLL3 is connected to VDD externally, VSUPPLY = 11, FCDEN = 1, and RVEN = 0; the pins operate as full complementary drive. For all other VSUPPLY modes, the GPIO shared with LCD operates as open drain. "
My problem is that I am unable to change the VSUPPLY to 11 or FCDEN to 1 (RVEN=0 by default). When attempting to change these values in CodeWarrior using the memory window, my new values are not accepted. I also cannot change the values in code. I have also tried jumpering VLL3 to VDD externally and re-booting the board....still no success.
Any suggestions welcome.
Solved! Go to Solution.
Hi,
you need to disable clock gating for the LCD module e.g. like this:
SCGC2_LCD = 1;
otherwise there are no clocks to the module and some registers don't work correctly.
Best regards,
Oliver
Hi,
you need to disable clock gating for the LCD module e.g. like this:
SCGC2_LCD = 1;
otherwise there are no clocks to the module and some registers don't work correctly.
Best regards,
Oliver
Thanks Oliver. In the interim I contacted Freescale support, who pretty much said the same thing. I used their input and it is working fine now. FYI, I am enclosing below their response which helped me through this...
/** Enable clock to the LCD module */
SCGC2_LCD = 1;
/** Disable LCD module */
LCDC0_LCDEN = 0;
LCDC1_FCDEN = 1;
LCDSUPPLY_VSUPPLY = 0b11;
"The most common error that I've seen so far is that the first two lines aren't included. These instructions are very important because if the module doesn't have a bus clock enable, the registers will not experience any change. In order to have a better configuration the LCD peripheral needs to disable the waveform generation (second instruction) "