EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Problem with LPC2478 lcd controller and UART

Started by seb seb June 5, 2009
Hi,

I'm working on a project using a LPC2478 + 32bits SDRAM from Micron (for lcd
data), a color TFT display (7inch 800x480).
The display and sdram works perfectly.
But I've got a big problem and I don't understand it :
I've a daughter card connected on UART2 (RS485). When I send caracters on
uart2 the image on LCD "freeze"
but the sdram data are not damaged because if I stop writing on the uart2
the image on lcd is good.

I make different test, I've got the same problem with uart0 and uart3. If I
put a delay between caracters the
LCD stop freezing but this delay is a problem for me.
The initialisation of the uart is not a problem. If I just call the
initialisation but dont write to
transmit register I've no problem.
When using the complete function to communicate with my daughter board the
comunication works perfectly
over uart2, only the LCD freeze.
Maybe important : it's a quite "old" LPC2478, NXP give it to me when they
start selling samples device
last year (revision C, normally 1st version regarding errata sheet)

Any idea ?

My test code :

void tempo(ulong t)
{
while(t > 0) t--;
}

void init_uart2()
{
PCONP |= (1 << 24);// Enable UART2 power

PINSEL0 |= 0x00500000;// Enable TxD2/RxD2

U2FDR = 0;
U2LCR = 0x8B; // 8 databits, Odd parity, 1 Stop bit
U2DLL = 5; //187500 bits/sec
U2DLM = 0;
U2LCR &= 0x7F;
}

void main()
{
display_picture();
init_uart2();

while(1)
{
while (!(U2LSR & 0x20)); //wait tx empty
U2THR = 0x55; //send value 0x55 over uart2

tempo(200); //No freeze when calling this function
}

}

Best regards,

Sebastien


An Engineer's Guide to the LPC2100 Series

----Original Message----
From: l...
[mailto:l...] On Behalf Of seb seb Sent:
05 June 2009 09:58 To: l...
Subject: [lpc2000] Problem with LPC2478 lcd controller and
UART

> Hi,
>
> I'm working on a project using a LPC2478 + 32bits SDRAM
> from Micron (for lcd data), a color TFT display (7inch
> 800x480).
> The display and sdram works perfectly.
> But I've got a big problem and I don't understand it :
> I've a daughter card connected on UART2 (RS485). When I
> send caracters on
> uart2 the image on LCD "freeze"
> but the sdram data are not damaged because if I stop
> writing on the uart2 the image on lcd is good.
>

It sounds like another version of the "internal AHB bus contention"
problem which some of us have had. Basically you can tie up the internal
data bus doing other operations which makes the graphics refresh stop
working.

If you search this forum for posts containing "AHBCFG1" you will find
more info about it.

--
Tim Mitchell

Hi,

--- In l..., "Tim Mitchell" wrote:
>
> It sounds like another version of the "internal AHB bus contention"
> problem which some of us have had. Basically you can tie up the internal
> data bus doing other operations which makes the graphics refresh stop
> working.
> --
> Tim Mitchell
>

It is easy to check reducing LCD refresh frequency.
Regards
Vladimir

thanks for your replay, I will make new tests on monday

regards,
Sebastien

2009/6/5 ljaschko

> Hi,
>
> --- In l... , "Tim Mitchell"
> wrote:
> >
> > It sounds like another version of the "internal AHB bus contention"
> > problem which some of us have had. Basically you can tie up the internal
> > data bus doing other operations which makes the graphics refresh stop
> > working.
> > --
> > Tim Mitchell
> > It is easy to check reducing LCD refresh frequency.
>
> Regards
> Vladimir
>
>
>


Hi,

Thank for your answers. Effectively when reducing LCD clocking, my problem
dissapear.
In fact I was using CCLK = 60 Mhz and LCD typical clock is 30 Mhz.
Now I use CCLK max freq. = 72 Mhz and reduce LCD clock to 24 Mhz. All is now
working together correctly without delay.

Sebastien

2009/6/5 Tim Mitchell

> ----Original Message----
> From: l...
> [mailto:l... ] On Behalf Of
> seb seb Sent:
> 05 June 2009 09:58 To: l...
> Subject: [lpc2000] Problem with LPC2478 lcd controller and
> UART
>
> > Hi,
> >
> > I'm working on a project using a LPC2478 + 32bits SDRAM
> > from Micron (for lcd data), a color TFT display (7inch
> > 800x480).
> > The display and sdram works perfectly.
> > But I've got a big problem and I don't understand it :
> > I've a daughter card connected on UART2 (RS485). When I
> > send caracters on
> > uart2 the image on LCD "freeze"
> > but the sdram data are not damaged because if I stop
> > writing on the uart2 the image on lcd is good.
> > It sounds like another version of the "internal AHB bus contention"
> problem which some of us have had. Basically you can tie up the internal
> data bus doing other operations which makes the graphics refresh stop
> working.
>
> If you search this forum for posts containing "AHBCFG1" you will find
> more info about it.
>
> --
> Tim Mitchell
>
>
>



The 2024 Embedded Online Conference