EmbeddedRelated.com
Forums
Memfault Beyond the Launch

LPC2364 UART3 Issue:

Started by prab...@yahoo.co.in December 24, 2009
Guys,
Here is my Uart3 Initialization:

PCONP |= 1<<25;
PINSEL1 |= 0x003C0000;
U3LCR |= 0x80;
U3DLL = 78;
U3DLM = 0x00;
U3LCR = 0x03;

U3FCR = 0x7;
U3TER = 0x80;

VICVectAddr9 = (unsigned long)TestPortISRWrapper;
VICVectCntl9 = 0x20 | 9;
VICIntEnable |= (1 << 29);
U3IER = 0x07;
I didn't Get any Interrupts.Atleast,After init we should get TX interrupt.But i didn't get.
Can i get any help from NXP.

Thanks,
________________________________
From: Jean-Jacques Dauchot
To: l...
Sent: Tue, 29 December, 2009 9:35:54 PM
Subject: RE: [lpc2000] Re: LPC2364 UART3 Issue:

OK , I give up !!!!!

How can we help this guy.

Is there an example code that will solve this
problem. It’s not a big deal….

Regards

Jean-Jacques

________________________________

From:lpc2000@yahoogroups .com [mailto:lpc2000@ yahoogroups. com] On Behalf Of rtstofer
Sent: 29 December 2009 15:36
To: lpc2000@yahoogroups .com
Subject: [lpc2000] Re: LPC2364
UART3 Issue:

--- In lpc2000@yahoogroups .com,
"Jean-Jacques Dauchot" wrote:
>
> Why who NXP do such a things?
>
> Is there any reasons for this?
>
> Regards
>
> Jean-Jacques
>

They do it so that other peripherals won't be excluded when one peripheral is
chosen. Pin sharing...

Look at the EINTx signals for the LPC2148. They map all over the place and you
pick the pins depending on what you can do without.

EINT0 on the LPC2148 maps to P0.1 and if this is chosen, TXD0 is lost. It also
maps to P0.16 which wipes out the capture and match 0.2 possibilities for
timer0.

There is almost never going to be a situation where I can do without TXD0 but I
suppose I can use P0.16 and lose the timer IO.

Maybe I don't even use EINT0 because of unfavorable mapping and I use EINT1
instead.

Richard

The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

An Engineer's Guide to the LPC2100 Series

Guys,
Here is my updated code.
i am using freertos,GCC.

taskENTER_CRITICAL();
PCONP |= 1<<25;
PINSEL1 |= 0x003C0000;
/* PINSEL0 |= 0x0000000A;
PINSEL9 |= 0x0F000000; */

U3LCR |= 0x80;
U3DLL = 78;
U3DLM = 0x00;
U3LCR = 0x03;

U3FCR = 0x7;
U3TER = 0x80;
VICIntSelect &=~(1 << 29);
VICVectAddr10 = (unsigned long)TestPortISRWrapper;
VICVectCntl10 |= 0x20 | 29;
VICIntEnable |= (1 << 29);
U3IER = 0x07;
taskEXIT_CRITICAL();

Without interrupt settingf,if i transmit data from LPC means,i have received, (tramiiting character from LPC)on Terminal.So Pin configuration is OK.But interrupt is not working????Please guide me where i have to look??
Thanks,

________________________________
From: pra bu
To: l...
Sent: Wed, 30 December, 2009 10:48:34 AM
Subject: Re: [lpc2000] Re: LPC2364 UART3 Issue:

Guys,
Here is my Uart3 Initialization:

PCONP |= 1<<25;
PINSEL1 |= 0x003C0000;
U3LCR |= 0x80;
U3DLL = 78;
U3DLM = 0x00;
U3LCR = 0x03;

U3FCR = 0x7;
U3TER = 0x80;

VICVectAddr9 = (unsigned long)TestPortISRWra pper;
VICVectCntl9 = 0x20 | 9;
VICIntEnable |= (1 << 29);
U3IER = 0x07;
I didn't Get any Interrupts.Atleast, After init we should get TX interrupt.But i didn't get.
Can i get any help from NXP.

Thanks,
________________________________
From: Jean-Jacques Dauchot
To: lpc2000@yahoogroups .com
Sent: Tue, 29 December, 2009 9:35:54 PM
Subject: RE: [lpc2000] Re: LPC2364 UART3 Issue:

OK , I give up !!!!!

How can we help this guy.

Is there an example code that will solve this
problem. It’s not a big deal….

Regards

Jean-Jacques

________________________________

From:lpc2000@yahoogroups .com [mailto:lpc2000@ yahoogroups. com] On Behalf Of rtstofer
Sent: 29 December 2009 15:36
To: lpc2000@yahoogroups .com
Subject: [lpc2000] Re: LPC2364
UART3 Issue:

--- In lpc2000@yahoogroups .com,
"Jean-Jacques Dauchot" wrote:
>
> Why who NXP do such a things?
>
> Is there any reasons for this?
>
> Regards
>
> Jean-Jacques
>

They do it so that other peripherals won't be excluded when one peripheral is
chosen. Pin sharing...

Look at the EINTx signals for the LPC2148. They map all over the place and you
pick the pins depending on what you can do without.

EINT0 on the LPC2148 maps to P0.1 and if this is chosen, TXD0 is lost. It also
maps to P0.16 which wipes out the capture and match 0.2 possibilities for
timer0.

There is almost never going to be a situation where I can do without TXD0 but I
suppose I can use P0.16 and lose the timer IO.

Maybe I don't even use EINT0 because of unfavorable mapping and I use EINT1
instead.

Richard
________________________________
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.

The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
Guys,
I found the problem.I will update.

Thanks,

________________________________
From: pra bu
To: l...
Sent: Wed, 30 December, 2009 1:03:35 PM
Subject: Re: [lpc2000] Re: LPC2364 UART3 Issue:

Guys,
Here is my updated code.
i am using freertos,GCC.

taskENTER_CRITICAL( );
PCONP |= 1<<25;
PINSEL1 |= 0x003C0000;
/* PINSEL0 |= 0x0000000A;
PINSEL9 |= 0x0F000000; */

U3LCR |= 0x80;
U3DLL = 78;
U3DLM = 0x00;
U3LCR = 0x03;

U3FCR = 0x7;
U3TER = 0x80;
VICIntSelect &=~(1 << 29);
VICVectAddr10 = (unsigned long)TestPortISRWra pper;
VICVectCntl10 |= 0x20 | 29;
VICIntEnable |= (1 << 29);
U3IER = 0x07;
taskEXIT_CRITICAL( );

Without interrupt settingf,if i transmit data from LPC means,i have received, (tramiiting character from LPC)on Terminal.So Pin configuration is OK.But interrupt is not working????Please guide me where i have to look??
Thanks,

________________________________
From: pra bu
To: lpc2000@yahoogroups .com
Sent: Wed, 30 December, 2009 10:48:34 AM
Subject: Re: [lpc2000] Re: LPC2364 UART3 Issue:

Guys,
Here is my Uart3 Initialization:

PCONP |= 1<<25;
PINSEL1 |= 0x003C0000;
U3LCR |= 0x80;
U3DLL = 78;
U3DLM = 0x00;
U3LCR = 0x03;

U3FCR = 0x7;
U3TER = 0x80;

VICVectAddr9 = (unsigned long)TestPortISRWra pper;
VICVectCntl9 = 0x20 | 9;
VICIntEnable |= (1 << 29);
U3IER = 0x07;
I didn't Get any Interrupts.Atleast, After init we should get TX interrupt.But i didn't get.
Can i get any help from NXP.

Thanks,
________________________________
From: Jean-Jacques Dauchot
To: lpc2000@yahoogroups .com
Sent: Tue, 29 December, 2009 9:35:54 PM
Subject: RE: [lpc2000] Re: LPC2364 UART3 Issue:

OK , I give up !!!!!

How can we help this guy.

Is there an example code that will solve this
problem. It’s not a big deal….

Regards

Jean-Jacques

________________________________

From:lpc2000@yahoogroups .com [mailto:lpc2000@ yahoogroups. com] On Behalf Of rtstofer
Sent: 29 December 2009 15:36
To: lpc2000@yahoogroups .com
Subject: [lpc2000] Re: LPC2364
UART3 Issue:

--- In lpc2000@yahoogroups .com,
"Jean-Jacques Dauchot" wrote:
>
> Why who NXP do such a things?
>
> Is there any reasons for this?
>
> Regards
>
> Jean-Jacques
>

They do it so that other peripherals won't be excluded when one peripheral is
chosen. Pin sharing...

Look at the EINTx signals for the LPC2148. They map all over the place and you
pick the pins depending on what you can do without.

EINT0 on the LPC2148 maps to P0.1 and if this is chosen, TXD0 is lost. It also
maps to P0.16 which wipes out the capture and match 0.2 possibilities for
timer0.

There is almost never going to be a situation where I can do without TXD0 but I
suppose I can use P0.16 and lose the timer IO.

Maybe I don't even use EINT0 because of unfavorable mapping and I use EINT1
instead.

Richard
________________________________
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
________________________________
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.

The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
Guys,
Address of VICVectcntl(same as VICVectPriority) is same in 21xx as well as 23xx.But different meaning in LPC21xx and LPC23xx.Please read 21xx and 23xx document.After modification as per above information,I have tested.Its working now.
Thanks,

________________________________
From: pra bu
To: l...
Sent: Wed, 30 December, 2009 5:18:50 PM
Subject: Re: [lpc2000] Re: LPC2364 UART3 Issue:

Guys,
I found the problem.I will update.

Thanks,

________________________________
From: pra bu
To: lpc2000@yahoogroups .com
Sent: Wed, 30 December, 2009 1:03:35 PM
Subject: Re: [lpc2000] Re: LPC2364 UART3 Issue:

Guys,
Here is my updated code.
i am using freertos,GCC.

taskENTER_CRITICAL( );
PCONP |= 1<<25;
PINSEL1 |= 0x003C0000;
/* PINSEL0 |= 0x0000000A;
PINSEL9 |= 0x0F000000; */

U3LCR |= 0x80;
U3DLL = 78;
U3DLM = 0x00;
U3LCR = 0x03;

U3FCR = 0x7;
U3TER = 0x80;
VICIntSelect &=~(1 << 29);
VICVectAddr10 = (unsigned long)TestPortISRWra pper;
VICVectCntl10 |= 0x20 | 29;
VICIntEnable |= (1 << 29);
U3IER = 0x07;
taskEXIT_CRITICAL( );

Without interrupt settingf,if i transmit data from LPC means,i have received, (tramiiting character from LPC)on Terminal.So Pin configuration is OK.But interrupt is not working????Please guide me where i have to look??
Thanks,

________________________________
From: pra bu
To: lpc2000@yahoogroups .com
Sent: Wed, 30 December, 2009 10:48:34 AM
Subject: Re: [lpc2000] Re: LPC2364 UART3 Issue:

Guys,
Here is my Uart3 Initialization:

PCONP |= 1<<25;
PINSEL1 |= 0x003C0000;
U3LCR |= 0x80;
U3DLL = 78;
U3DLM = 0x00;
U3LCR = 0x03;

U3FCR = 0x7;
U3TER = 0x80;

VICVectAddr9 = (unsigned long)TestPortISRWra pper;
VICVectCntl9 = 0x20 | 9;
VICIntEnable |= (1 << 29);
U3IER = 0x07;
I didn't Get any Interrupts.Atleast, After init we should get TX interrupt.But i didn't get.
Can i get any help from NXP.

Thanks,
________________________________
From: Jean-Jacques Dauchot
To: lpc2000@yahoogroups .com
Sent: Tue, 29 December, 2009 9:35:54 PM
Subject: RE: [lpc2000] Re: LPC2364 UART3 Issue:

OK , I give up !!!!!

How can we help this guy.

Is there an example code that will solve this
problem. It’s not a big deal….

Regards

Jean-Jacques

________________________________

From:lpc2000@yahoogroups .com [mailto:lpc2000@ yahoogroups. com] On Behalf Of rtstofer
Sent: 29 December 2009 15:36
To: lpc2000@yahoogroups .com
Subject: [lpc2000] Re: LPC2364
UART3 Issue:

--- In lpc2000@yahoogroups .com,
"Jean-Jacques Dauchot" wrote:
>
> Why who NXP do such a things?
>
> Is there any reasons for this?
>
> Regards
>
> Jean-Jacques
>

They do it so that other peripherals won't be excluded when one peripheral is
chosen. Pin sharing...

Look at the EINTx signals for the LPC2148. They map all over the place and you
pick the pins depending on what you can do without.

EINT0 on the LPC2148 maps to P0.1 and if this is chosen, TXD0 is lost. It also
maps to P0.16 which wipes out the capture and match 0.2 possibilities for
timer0.

There is almost never going to be a situation where I can do without TXD0 but I
suppose I can use P0.16 and lose the timer IO.

Maybe I don't even use EINT0 because of unfavorable mapping and I use EINT1
instead.

Richard
________________________________
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
________________________________
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
________________________________
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.

The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/

Memfault Beyond the Launch