Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] UART ISR

2004-11-04 by Robert Adsett

At 10:09 PM 11/4/04 +0000, you wrote:


>I know I've asked this question many many times, but I still can't
>figure out what is wrong.  I've tried some of the code on the forums,
>and that seemed to work.  When I cut and paste it into my project it
>no longer seems to work.  I've reduced this to as simple as I can get
>it, can anyone see some thing wrong?
>
>The main.c there in full, you should just be able to compile it if you
>use Keil's (if you have gcc, it might need a minor modification).  I
>believe that this should send out an infinite number of 'a's, which of
>course it does on the simulator, but not in real life.  When I debug
>it via JTAG in uVision3, I see the THRE interrupt for a short while,
>but then it dissappears, but the ISR is never called (as seen by the
>LED still being on).  Yes I have tested the LED code, it works.
>
>Hear is some code from my startup.s (I'm using Keil's)
>
>// Enter Supervisor Mode and set its Stack Pointer
>                 MSR     CPSR_c, #Mode_SVC|I_Bit|F_Bit
>                 MOV     SP, R0
>                 SUB     R0, R0, #SVC_Stack_Size
>
>                 // Stay in supervisor mode, IRQ and FIQ
>                 MSR     CPSR_c, #Mode_SVC
>
>// Enter the C code
>                 LDR     R0,=main
>                 TST     R0,#1       ; Bit-0 set: main is Thumb
>                 LDREQ   LR,=exit?A  ; ARM Mode
>                 LDRNE   LR,=exit?T  ; Thumb Mode
>                 BX      R0
>                 ENDP

Something sets up the IRQ stack?
It would also be useful to verify your IRQ dispatch code.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.