AnsweredAssumed Answered

MCF5329 LCDC as GPIO

Question asked by Jaswinder Dhaliwal on Apr 15, 2013
Latest reply on Apr 16, 2013 by Jaswinder Dhaliwal

Hi

 

I want to use the LCDC LD0 and LD1 as GPIO output pins.

From reading the 5329 ref manual, they default to GPIO and configured as inputs..

 

But I have configured it for GPIO anyway. I can set and clear  LD0 but

can't seem to do anything with LD1.

 

I have used the following code to configure and drive.

 

VMCF5329_GPIO_STRUCT_PTR gpio = &((VMCF5329_STRUCT_PTR)_PSP_GET_IPSBAR())->GPIO;

gpio->PAR_LCDDATA = 0; //configure as GPIO

 

gpio->PDDR_LCDDATAL = 0x03; //LD0 and LD1 as output

 

gpio->PPDSDR_LCDDATAL = MCF5329_GPIO_PPDSDR_x0 || MCF5329_GPIO_PPDSDR_x1;  //to set LD0 & LD1

gpio->PCLRR_LCDDATAL = MCF5329_GPIO_PCLRR_x0 || MCF5329_GPIO_PCLRR_x1;  // to clear LD0 & LD1

 

I have also tried

gpio->PODR_LCDDATAL = 0x0;

gpio->PODR_LCDDATAL = 0x3;

 

I can see LD0 changing state but not LD1. Not sure what I doing wrong or missed anything out.

Note : I have not done anything with drive strength.

 

Thanks

Outcomes