HCS08LG32 Pin Multiplex Question

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

HCS08LG32 Pin Multiplex Question

跳至解决方案
1,809 次查看
Thunder
Contributor III

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.

标签 (1)
0 项奖励
回复
1 解答
486 次查看
Oliver
Contributor III

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

在原帖中查看解决方案

0 项奖励
回复
2 回复数
487 次查看
Oliver
Contributor III

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

0 项奖励
回复
486 次查看
Thunder
Contributor III

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) "