Reply by Martin Maurer October 10, 20072007-10-10
Hello,

U1THR is a WO register. You can't read back what you have written. See user
manual (UART1 register map).
When you read from U1THR then you effectively access U1RBR (same address !),
which is the receive buffer register.

Regards,

Martin

----- Original Message -----
From: Shilpa Shilpa
To: l...
Sent: Wednesday, October 10, 2007 2:18 PM
Subject: [lpc2000] writing to UART1 THR in LPC2138
Hi,

Strange issue that I see is nothing gets written into the memory address
provided to the UART1 THR regsiter in LPC2138.I have an example code that
initialises the UART1 LCR,baud rate to 9600 and
again disables the respective bits in LCR to access the U1THR regsiter.I am
just writing a value of 65 in this regsiter.Though this gets displayed as
"A" on the hyperterminal which is correct it indicates a value of 0x0 when i
see the memory address issued to this regsiter and also in the peripherals
regsiter window.
I am not sure to what step I am missing that is not allowing me to write
into this register.I request you all to provdie me help regarding this.

Thanks,

----- Original Message -----
From: Shilpa Shilpa
To: l...
Sent: Tue, 9 Oct 2007 08:54:47 +0530 (IST)
Subject: Re: [lpc2000] Re: UART0 LPC2148 - RBR Interrupt

Hi All,

I have an example code for UART0 in interrupt mode in LPC2138 processor and
I am making use of the MCB2130 evaluation board.The code is such that it
hits the ISR only when you type something on the hyperterminal but the
problem here is the characters I type doesnot match with the one i.e.
getting displayed on the terminal i.e. if I am typing as A B C D it receives
as A # & etc... which clearly means that from the PC side I am unable to
receive the proper characters.Hence I request you to tell me to what might
be the reason behind the wrong receiving of the characters.

Thanks,
fasgfdgfs
----- Original Message -----
From: Shilpa Shilpa
To: l...
Sent: Fri, 5 Oct 2007 10:50:50 +0530 (IST)
Subject: Re: [lpc2000] Re: UART0 LPC2148 - RBR Interrupt

Hi Joel,

I am also working on the same my application is that when I type some
characters on the hyperterminal I should hit the receive interrupt ISR. I am
working on MCB2130 board with LPC2138 controller and it would be great if
you could provide me an example code for UART0 receive mode that genrates
the interrupt.

I am running short of time hence it woul be great if anyone can send me the
code.

Thx in advance,
shilu
----- Original Message -----
From: Joel Winarske
To: l...
Sent: Fri, 5 Oct 2007 02:40:28 +0530 (IST)
Subject: Re: [lpc2000] Re: UART0 LPC2148 - RBR Interrupt
> Joel,
>
> I made the alteration what you recommended.
> The interruption is happening, but it isn't executing the function
> uart0.
> What can be the problem?

The flow goes as follows:
You register your interrupt handler to the interrupt controller. You want
to define your interrupt handler with
__irq __arm void XXXXX (void)

The __irq will surpress prolog/epilog ASM added to the ISR function.
All interrupt handler code must be ARM, hence the __arm.

In your startup code the interrupt vector for an IRQ can point to a couple
of places. Direct to interrupt controller, or an ISR dispatcher.

As long as your code is registered with interrupt controller and the
actual interrupt vector is pointing to the right place, your interrupt
code will fire.

So it sounds like the path from interrupt vector is not making it to your
ISR code - uart0.

Review the example....
Joel

--
My life has changed. What about yours?
Log on to the new Indiatimes Mail and Live out of the Inbox!
--
My life has changed. What about yours?
Log on to the new Indiatimes Mail and Live out of the Inbox!

An Engineer's Guide to the LPC2100 Series