EmbeddedRelated.com
Forums
Memfault Beyond the Launch

those crazy interrupts (2138)

Started by WadeA & RebeccaM Smith March 10, 2009
I do have a JTAG (Rowley Crossconnect)

int main(void)
{
processorInit();
U0Initialize(19200);
U1Initialize(19200);
timerInit();
__ARMLIB_enableIRQ(); // DIES HORRIBLY when THIS executes


When I set up the UART1, "Just In Case" I clear the interrupts so that (theoretically) there are no pending interrupts when I turn on IRQs.

When I look at the registers at the abort function, the address in the link register (lr=r14) is a few C instructions past my breakpoint. That is something I haven't figured out yet, but VERY consistant. It has been quite a while since I last stomped through the registers to find the culprit line, so instruction in this matter would be helpful. (And if I wuz smart, I wood rite it down so's I dont forgets agin.)

When I comment out "U1Initialize(19200);" then life is good, I just can't communicate to my serial motor controller. :-b

--- In l..., "J.C. Wren" wrote:
>
> I may have missed this in an earlier post, but do you know at exactly which
> line or instruction the error occurs at?
>
> If you don't have a JTAG debugger (and I don't), pick a LED, write a line of
> code to turn it on, and keep moving the line forward until the LED stops
> turning on. Now you know at exactly what line it's failing. Then look at
> the disassembly listing to see if you can determine what instructions are
> causing the fault.
>
> --jc
>
> On Wed, Mar 11, 2009 at 8:39 AM, WadeA & RebeccaM Smith
> wrote:
>
> > OK, I tried it. No change in results. Still aborts if I initialize UART1
> > and turn on IRQs.
> >
> > PCONP = 0x0003BE;
> > /* INCLUDED
> > * 0x200=RTC 0x100=SPI0
> > * 0x80=I2C 0x20=PWM0 0x10=UART1
> > * 0x08=UART0 0x04=TIM1 0x02=TIM0
> > * EXCLUDED
> > * 0x1000001 0x080000=I2C1 0x1000
> > * 0x400=SPI1 */
> >
> > int main(void)
> > {
> > processorInit();
> > U0Initialize(19200);
> > U1Initialize(19200);
> > timerInit();
> > __ARMLIB_enableIRQ(); // DIES HORRIBLY when this executes
> >
> >
> > --- In l... , Sergio Sider
> > wrote:
> > >
> > > Hi,
> > >
> > > Just a thought... I was not really reading all the thread, but did you
> > > turn the power of the UART (using PCONP register?). UART0 is enabled
> > > by default, but not the other uarts AFAIK.
> > >
> > > Regards,
> > > Sergio.
> > >
> > > On Wed, Mar 11, 2009 at 10:23 AM, WadeA & RebeccaM Smith
> > > wrote:
> > > > Well, as I said, UART1 was a duplicate of UART0 -- all functions.
> > > > And there was no prototype defined for UART0, which has been faithfully
> > > > spitting out at 19200. It does not matter if I have the
> > "__attribute(IRQ)"
> > > > or NOT for UART0. It DOES matter if I have them for timer0 and RTC
> > (pabort
> > > > if it dont have them).
> > > >
> > > > The only thing that IS consistent is that if I initialize UART1 I get
> > either
> > > > a pabort or dabort.
> > > > (insert favorite frustration expression here)
> > > >
> > > > I added LOTS more detail showing bit patterns and VIC slots
> >
> >
> >
>
>

An Engineer's Guide to the LPC2100 Series

Paul, ol' buddy! Pal!
(Huh? Why, yes, I am going to ask you something. How did you guess?)

Oh great guru of Crossworks, any pointers to find why calling "__ARMLIB_enableIRQ();" causes aborts only after UART1 gets initialized?
Any registers I can look at to track it down?
How about a temporary brain transplant? I promise I give yours back to you after a brief time. ;-)

wade

--- In l..., "Paul Curtis" wrote:
>
> John,
>
> > I may have missed this in an earlier post, but do you know at exactly
> which
> > line or instruction the error occurs at?
> >
> > If you don't have a JTAG debugger (and I don't), pick a LED, write a
> line...
>
> Don't tell me: mains power is a luxury too? ;-)
>
> --
> Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
> CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
>

I have 30,000 hamsters all running in wheels that produce about 100
milliwatts each. This is enough to keep a large bank of Leyden jars charged
to power the arc furnace that produces steam for the turbines.

I also supplement the heat from the arc furnace with the hot air from
politicians. The output has increased enough that I may be able to retire
the hamsters.

--kc

On Wed, Mar 11, 2009 at 9:11 AM, Paul Curtis wrote:

> John,
> > I may have missed this in an earlier post, but do you know at exactly
> which
> > line or instruction the error occurs at?
> >
> > If you don't have a JTAG debugger (and I don't), pick a LED, write a
> line...
>
> Don't tell me: mains power is a luxury too? ;-)
>
> --
> Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
> CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
>
>
>


Wade,

> Paul, ol' buddy! Pal!
> (Huh? Why, yes, I am going to ask you something. How did you guess?)
>
> Oh great guru of Crossworks, any pointers to find why calling
> "__ARMLIB_enableIRQ();" causes aborts only after UART1 gets initialized?
> Any registers I can look at to track it down?
> How about a temporary brain transplant? I promise I give yours back to
you
> after a brief time. ;-)

Hmm, I wrote some UART drivers for the 2100 and 2300 series but that's sort
of linked to CTL. You're welcome to have a look at them and use them if you
wish. I know they work.

Have you been using ctl_set_isr() to set things up? Common misconception is
that using ctl_set_isr is somehow related to using the CTL library, which it
isn't.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors



> -----Original Message-----
> From: l...
> [mailto:l...] On Behalf Of J.C. Wren
> Sent: 11 March 2009 14:26
> To: l...
> Subject: Re: [lpc2000] Re: those crazy interrupts (2138)
>
> I have 30,000 hamsters all running in wheels that produce about 100
> milliwatts each. This is enough to keep a large bank of
> Leyden jars charged
> to power the arc furnace that produces steam for the turbines.
>
> I also supplement the heat from the arc furnace with the hot air from
> politicians. The output has increased enough that I may be
> able to retire
> the hamsters.
>
> --kc
....but what do you feed the hamsters on? (kc?)
Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers. More than 7000 downloads per month.

+ http://www.SafeRTOS.com
Certified by T as meeting the requirements for safety related systems.

I am suspicious of your pin select calculations. According to the
datasheet, these should be bits 17:16 for TXD1 and 19:18 for RXD1. You seem
to be altering bits 11:10 and 9:8. However, I don't know if UART1 actually
requires the pin select block to be configured for it to operate internally
(as in: the UART works, but it just looks like nothing is connected).

--jc

On Wed, Mar 11, 2009 at 8:23 AM, WadeA & RebeccaM Smith
wrote:

> Well, as I said, UART1 was a duplicate of UART0 -- all functions.
> And there was no prototype defined for UART0, which has been faithfully
> spitting out at 19200. It does not matter if I have the "__attribute(IRQ)"
> or NOT for UART0. It DOES matter if I have them for timer0 and RTC (pabort
> if it dont have them).
>
> The only thing that IS consistent is that if I initialize UART1 I get
> either a pabort or dabort.
> (insert favorite frustration expression here)
>
> I added LOTS more detail showing bit patterns and VIC slots
>
> /* VIC assignments (more detail)
> * Addr/Cntl 0 = timer0
> * VIC_CTRL_TIMER0 (0x00000004)
> * VIC_TIMER0 (0x00000010)
>
> * Addr/Cntl 1 = i2c (not enabled)
> * VIC_CTRL_I2C0 (0x00000009)
> * VIC_I2C0 (0x00000200)
> * Addr/Cntl 2 = spi (not enabled)
> * VIC_CTRL_SPI0 (0x0000000A)
> * VIC_SPI0 (0x00000400)
> * Addr/Cntl 3 = timer1 (not enabled)
> * VIC_CTRL_TIMER1 (0x00000005)
> * VIC_TIMER1 (0x00000020)
> * Addr/Cntl 4 = uart0
> * VIC_CTRL_UART0 (0x00000006)
> * VIC_UART0 (0x00000040)
> * Addr/Cntl 5 = uart1
> * VIC_CTRL_UART1 (0x00000007)
> * VIC_UART1 (0x00000080)
> * Addr/Cntl 6 = RTC
> * VIC_CTRL_RTC (0x0000000D)
> * VIC_RTC (0x00002000)
> * Addr/Cntl 7+= n/a
> */
>
> ------------ start of code ------------
> void timer0_isr(void) __attribute__ ((interrupt ("IRQ")));
> void tmr1_ISR(void) __attribute__ ((interrupt ("IRQ")));
> void RTC_ISR(void) __attribute__ ((interrupt ("IRQ")));
>
> void RTC_ISR(void)
> {
> mySeconds++; /* ### for DEBUG */
>
> /* other code here */
> /* ### for DEBUG = PROOF that it is working */
> if (IO1PIN & YEL_LED)
> IO1CLR = YEL_LED;
> else
> IO1SET = YEL_LED;
>
> ILR = ILR_RTCCIF + ILR_RTCALF; /* clear possible intrs */
> VICVectAddr = 0x0;
> }
>
> void timerInit(void)
> {
> (snip)
> VICVectCntl0 = VIC_CTRL_ENABLE + VIC_CTRL_TIMER0; /* (0x00000020) +
> (0x00000004) */
> VICVectAddr0 = (INTU32)timer0_isr;
> VICIntSelect = 0;
> VICIntEnable = VIC_TIMER0; /* Enable timer 0 interrupt VIC_TIMER0
> (0x00000010) */
>
> #if 0 // NOT INCLUDED, but shown just to be complete
> (snip)
> VICVectCntl3 = VIC_CTRL_ENABLE + VIC_CTRL_TIMER1; /* 0x25 */
> VICVectAddr3 = (INTU32)tmr1_ISR;
> VICIntSelect &= ~VIC_TIMER1;
> VICIntEnable = VIC_TIMER1; /* enable timer1 interrupt VIC_TIMER1
> (0x00000020) */
> (snip)
> #endif
>
> /******* Init the Real Time Clock *******/
> /* generate 32768 clock from PCLK */
> PREFRAC = pclk / 32768;
> PREINT = (int) (pclk / 32768) - 1;
> CCR = CCR_CTCRST; /* 0x02 Reset the clock */
> CIIR = 0x00000001; /* Enable seconds counter interrupt */
> (snip Y/M/D H:M:S setup)
> VICVectCntl6 = VIC_CTRL_ENABLE + VIC_CTRL_RTC; /* 2d */
> VICVectAddr6 = (unsigned int)RTC_ISR;
> VICIntSelect = 0;
> VICIntEnable = VIC_RTC; /* enable RTC interrupt VIC_RTC (0x00002000) */
>
> ILR = ILR_RTCCIF; /* 0x01 clear interrupts on ILR */
> AMR = 0xFF; /* mask off Alarm Match Interrupt */
>
> /* Clock Control Register for RTC */
> CCR = CCR_CLKEN; /* 0x01 + connected to PCLK */
> } /* end of timerInit() */
> ------------ end of code ------------
>
> ------------ start of code ------------
> // the following two lines may or may not be in the code
> void uart0ISR(void) __attribute__ ((interrupt ("IRQ")));
> void uart1ISR(void) __attribute__ ((interrupt ("IRQ")));
> // the above 2 lines have no effect on UART0 nor UART1
> // UART0 still works and UART1 still aborts (cuss!)
>
> void uart0ISR(void)
> {
> (snip)
> }
>
> void uart1ISR(void)
> {
> (snip)
> }
>
> void U0Initialize(INTU32 baud)
> {
> /* Configure UART0 */
> unsigned int dummy;
> unsigned int divisor > liblpc2000_get_pclk(liblpc2000_get_cclk(OSCILLATOR_CLOCK_FREQUENCY)) / (16 *
> baud);
> U0LCR = 0x83; /* 8 bit, 1 stop bit, no parity, enable DLAB */
> U0DLL = divisor & 0xFF;
> U0DLM = (divisor >> 8) & 0xFF;
> U0LCR &= ~0x80; /* Disable DLAB */
> PINSEL0 = (PINSEL0 & (0xFFFFFFF0)) | (PINSEL0_P0_0TXD0 + PINSEL0_P0_1RXD0);
> /* 0x0005 */
> U0FCR = U0FCR_FIFO_Enable;
>
> /* Setup UART0 RX interrupt */
> VICVectCntl4 = VIC_CTRL_ENABLE + VIC_CTRL_UART0; /* 0x25; */
> VICVectAddr4 = (INTU32)uart0ISR;
> VICIntSelect = 0;
> VICIntEnable = VIC_UART0; /* enable uart0 interrupt 0x00000040 */
> U0IER = U0IER_RBR_Interrupt_Enable;
> dummy = U0IIR; /* Read IIR to clear interrupt "Just In Case" */
> }
>
> void U1Initialize(INTU32 baud)
> {
> /* Configure UART1 */
> unsigned int dummy;
> unsigned int divisor > liblpc2000_get_pclk(liblpc2000_get_cclk(OSCILLATOR_CLOCK_FREQUENCY)) / (16 *
> baud);
> U1LCR = 0x83; /* 8 bit, 1 stop bit, no parity, enable DLAB */
> U1DLL = divisor & 0xFF;
> U1DLM = (divisor >> 8) & 0xFF;
> U1LCR &= ~0x80; /* Disable DLAB */
> PINSEL0 = (PINSEL0 & (0xFFFFF0FF)) | (PINSEL0_P0_8TXD1 + PINSEL0_P0_9RXD1);
> U1FCR = U1FCR_FIFO_Enable;
>
> /* Setup UART RX interrupt */
> VICVectCntl5 = VIC_CTRL_ENABLE + VIC_CTRL_UART1; /* 27; */
> VICVectAddr5 = (INTU32)uart1ISR;
> VICIntSelect = 0;
> VICIntEnable = VIC_UART1; /* enable uart1 interrupt */
> U1IER = U1IER_RBR_Interrupt_Enable;
> dummy = U1IIR; /* Read IIR to clear interrupt 0x00000080 */
> }
> ------------ end of code ------------
>
> OK, so someone with more brains that I have (i.e., everyone reading this)
> could you PLEASE tell me where I have lost it (regarding the interrupts,
> since the other areas of my life are too numerous to mention)?
>
> "If it's not one thing it's another." -- author unknown
>
> wade
>
> --- In l... , Kenneth Crudup
> wrote:
> >
> >
> > On Tue, 10 Mar 2009, WadeA & RebeccaM Smith wrote:
> >
> > > static void uart1ISR(void)
> >
> > Ah, never mind. It'd appeared as if you'd been victim to
> "__attribute(IRQ)".
> >
> > -Kenny
> >
> > --
> > Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Los Angeles
> > O: 3630 S. Sepulveda Blvd. #138, L.A., CA 90034-6809 (888) 454-8181
> >
>


These are carnivorous hamsters, so we feed them the local children who
trespass on to my lawn. I used to yell 'Get of my lawn, you damn kids!' but
this method is more environmentally sound.

Sometimes the RF noise from the arc furnace causes the serial port to
glitch. In this case the 'kc' was a result of such a glitch :)

--jc

On Wed, Mar 11, 2009 at 9:47 AM, FreeRTOS info wrote:

> > -----Original Message-----
> > From: l...
> > [mailto:l... ] On Behalf
> Of J.C. Wren
> > Sent: 11 March 2009 14:26
> > To: l...
> > Subject: Re: [lpc2000] Re: those crazy interrupts (2138)
> >
> > I have 30,000 hamsters all running in wheels that produce about 100
> > milliwatts each. This is enough to keep a large bank of
> > Leyden jars charged
> > to power the arc furnace that produces steam for the turbines.
> >
> > I also supplement the heat from the arc furnace with the hot air from
> > politicians. The output has increased enough that I may be
> > able to retire
> > the hamsters.
> >
> > --kc
>
> ....but what do you feed the hamsters on? (kc?)
>
> Regards,
> Richard.
>
> + http://www.FreeRTOS.org
> Designed for Microcontrollers. More than 7000 downloads per month.
>
> + http://www.SafeRTOS.com
> Certified by T as meeting the requirements for safety related systems.
>
>
>


--- In l..., "WadeA & RebeccaM Smith" wrote:
>
> dummy = U1IIR; /* Read IIR to clear interrupt "Just In Case" */

It's bad idea to do this after the IRQ's are enabled at UART and VIC. Do you have a Default IRQ handler?

Regards
Zdravko

What is your reasoning that this is a bad idea? He's not enabled global
interrupts yet, so no actual IRQ will take place. Even if it somehow queues
an interrupt up, it's going to go to the UART1 ISR handler.

Personally, I think it's unncessary, but I'd like to hear why you think it's
a bad idea.

--jc

On Wed, Mar 11, 2009 at 10:30 AM, Zdravko wrote:

> --- In l... , "WadeA &
> RebeccaM Smith" wrote:
> >
> > dummy = U1IIR; /* Read IIR to clear interrupt "Just In Case" */
>
> It's bad idea to do this after the IRQ's are enabled at UART and VIC. Do
> you have a Default IRQ handler?
>
> Regards
> Zdravko
>
>
>


Good point. I was looking at pin numbers and not considering 2 locations per pin. I fixed that. Still goes into la la land when I allow UART1 to initialize.

Please feel free to point out any other possibilities.

--- In l..., "J.C. Wren" wrote:
>
> I am suspicious of your pin select calculations. According to the
> datasheet, these should be bits 17:16 for TXD1 and 19:18 for RXD1. You seem
> to be altering bits 11:10 and 9:8. However, I don't know if UART1 actually
> requires the pin select block to be configured for it to operate internally
> (as in: the UART works, but it just looks like nothing is connected).
>
> --jc
>
> On Wed, Mar 11, 2009 at 8:23 AM, WadeA & RebeccaM Smith
> wrote:
>
> > Well, as I said, UART1 was a duplicate of UART0 -- all functions.
> > And there was no prototype defined for UART0, which has been faithfully
> > spitting out at 19200. It does not matter if I have the "__attribute(IRQ)"
> > or NOT for UART0. It DOES matter if I have them for timer0 and RTC (pabort
> > if it dont have them).
> >
> > The only thing that IS consistent is that if I initialize UART1 I get
> > either a pabort or dabort.
> > (insert favorite frustration expression here)
> >
> > I added LOTS more detail showing bit patterns and VIC slots
> >
> > /* VIC assignments (more detail)
> > * Addr/Cntl 0 = timer0
> > * VIC_CTRL_TIMER0 (0x00000004)
> > * VIC_TIMER0 (0x00000010)
> >
> > * Addr/Cntl 1 = i2c (not enabled)
> > * VIC_CTRL_I2C0 (0x00000009)
> > * VIC_I2C0 (0x00000200)
> > * Addr/Cntl 2 = spi (not enabled)
> > * VIC_CTRL_SPI0 (0x0000000A)
> > * VIC_SPI0 (0x00000400)
> > * Addr/Cntl 3 = timer1 (not enabled)
> > * VIC_CTRL_TIMER1 (0x00000005)
> > * VIC_TIMER1 (0x00000020)
> > * Addr/Cntl 4 = uart0
> > * VIC_CTRL_UART0 (0x00000006)
> > * VIC_UART0 (0x00000040)
> > * Addr/Cntl 5 = uart1
> > * VIC_CTRL_UART1 (0x00000007)
> > * VIC_UART1 (0x00000080)
> > * Addr/Cntl 6 = RTC
> > * VIC_CTRL_RTC (0x0000000D)
> > * VIC_RTC (0x00002000)
> > * Addr/Cntl 7+= n/a
> > */
> >
> > ------------ start of code ------------
> > void timer0_isr(void) __attribute__ ((interrupt ("IRQ")));
> > void tmr1_ISR(void) __attribute__ ((interrupt ("IRQ")));
> > void RTC_ISR(void) __attribute__ ((interrupt ("IRQ")));
> >
> > void RTC_ISR(void)
> > {
> > mySeconds++; /* ### for DEBUG */
> >
> > /* other code here */
> > /* ### for DEBUG = PROOF that it is working */
> > if (IO1PIN & YEL_LED)
> > IO1CLR = YEL_LED;
> > else
> > IO1SET = YEL_LED;
> >
> > ILR = ILR_RTCCIF + ILR_RTCALF; /* clear possible intrs */
> > VICVectAddr = 0x0;
> > }
> >
> > void timerInit(void)
> > {
> > (snip)
> > VICVectCntl0 = VIC_CTRL_ENABLE + VIC_CTRL_TIMER0; /* (0x00000020) +
> > (0x00000004) */
> > VICVectAddr0 = (INTU32)timer0_isr;
> > VICIntSelect = 0;
> > VICIntEnable = VIC_TIMER0; /* Enable timer 0 interrupt VIC_TIMER0
> > (0x00000010) */
> >
> > #if 0 // NOT INCLUDED, but shown just to be complete
> > (snip)
> > VICVectCntl3 = VIC_CTRL_ENABLE + VIC_CTRL_TIMER1; /* 0x25 */
> > VICVectAddr3 = (INTU32)tmr1_ISR;
> > VICIntSelect &= ~VIC_TIMER1;
> > VICIntEnable = VIC_TIMER1; /* enable timer1 interrupt VIC_TIMER1
> > (0x00000020) */
> > (snip)
> > #endif
> >
> > /******* Init the Real Time Clock *******/
> > /* generate 32768 clock from PCLK */
> > PREFRAC = pclk / 32768;
> > PREINT = (int) (pclk / 32768) - 1;
> > CCR = CCR_CTCRST; /* 0x02 Reset the clock */
> > CIIR = 0x00000001; /* Enable seconds counter interrupt */
> > (snip Y/M/D H:M:S setup)
> > VICVectCntl6 = VIC_CTRL_ENABLE + VIC_CTRL_RTC; /* 2d */
> > VICVectAddr6 = (unsigned int)RTC_ISR;
> > VICIntSelect = 0;
> > VICIntEnable = VIC_RTC; /* enable RTC interrupt VIC_RTC (0x00002000) */
> >
> > ILR = ILR_RTCCIF; /* 0x01 clear interrupts on ILR */
> > AMR = 0xFF; /* mask off Alarm Match Interrupt */
> >
> > /* Clock Control Register for RTC */
> > CCR = CCR_CLKEN; /* 0x01 + connected to PCLK */
> > } /* end of timerInit() */
> > ------------ end of code ------------
> >
> > ------------ start of code ------------
> > // the following two lines may or may not be in the code
> > void uart0ISR(void) __attribute__ ((interrupt ("IRQ")));
> > void uart1ISR(void) __attribute__ ((interrupt ("IRQ")));
> > // the above 2 lines have no effect on UART0 nor UART1
> > // UART0 still works and UART1 still aborts (cuss!)
> >
> > void uart0ISR(void)
> > {
> > (snip)
> > }
> >
> > void uart1ISR(void)
> > {
> > (snip)
> > }
> >
> > void U0Initialize(INTU32 baud)
> > {
> > /* Configure UART0 */
> > unsigned int dummy;
> > unsigned int divisor > > liblpc2000_get_pclk(liblpc2000_get_cclk(OSCILLATOR_CLOCK_FREQUENCY)) / (16 *
> > baud);
> > U0LCR = 0x83; /* 8 bit, 1 stop bit, no parity, enable DLAB */
> > U0DLL = divisor & 0xFF;
> > U0DLM = (divisor >> 8) & 0xFF;
> > U0LCR &= ~0x80; /* Disable DLAB */
> > PINSEL0 = (PINSEL0 & (0xFFFFFFF0)) | (PINSEL0_P0_0TXD0 + PINSEL0_P0_1RXD0);
> > /* 0x0005 */
> > U0FCR = U0FCR_FIFO_Enable;
> >
> > /* Setup UART0 RX interrupt */
> > VICVectCntl4 = VIC_CTRL_ENABLE + VIC_CTRL_UART0; /* 0x25; */
> > VICVectAddr4 = (INTU32)uart0ISR;
> > VICIntSelect = 0;
> > VICIntEnable = VIC_UART0; /* enable uart0 interrupt 0x00000040 */
> > U0IER = U0IER_RBR_Interrupt_Enable;
> > dummy = U0IIR; /* Read IIR to clear interrupt "Just In Case" */
> > }
> >
> > void U1Initialize(INTU32 baud)
> > {
> > /* Configure UART1 */
> > unsigned int dummy;
> > unsigned int divisor > > liblpc2000_get_pclk(liblpc2000_get_cclk(OSCILLATOR_CLOCK_FREQUENCY)) / (16 *
> > baud);
> > U1LCR = 0x83; /* 8 bit, 1 stop bit, no parity, enable DLAB */
> > U1DLL = divisor & 0xFF;
> > U1DLM = (divisor >> 8) & 0xFF;
> > U1LCR &= ~0x80; /* Disable DLAB */
> > PINSEL0 = (PINSEL0 & (0xFFFFF0FF)) | (PINSEL0_P0_8TXD1 + PINSEL0_P0_9RXD1);
> > U1FCR = U1FCR_FIFO_Enable;
> >
> > /* Setup UART RX interrupt */
> > VICVectCntl5 = VIC_CTRL_ENABLE + VIC_CTRL_UART1; /* 27; */
> > VICVectAddr5 = (INTU32)uart1ISR;
> > VICIntSelect = 0;
> > VICIntEnable = VIC_UART1; /* enable uart1 interrupt */
> > U1IER = U1IER_RBR_Interrupt_Enable;
> > dummy = U1IIR; /* Read IIR to clear interrupt 0x00000080 */
> > }
> > ------------ end of code ------------
> >
> > OK, so someone with more brains that I have (i.e., everyone reading this)
> > could you PLEASE tell me where I have lost it (regarding the interrupts,
> > since the other areas of my life are too numerous to mention)?
> >
> > "If it's not one thing it's another." -- author unknown
> >
> > wade
> >
> > --- In l... , Kenneth Crudup
> > wrote:
> > >
> > >
> > > On Tue, 10 Mar 2009, WadeA & RebeccaM Smith wrote:
> > >
> > > > static void uart1ISR(void)
> > >
> > > Ah, never mind. It'd appeared as if you'd been victim to
> > "__attribute(IRQ)".
> > >
> > > -Kenny
> > >
> > > --
> > > Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Los Angeles
> > > O: 3630 S. Sepulveda Blvd. #138, L.A., CA 90034-6809 (888) 454-8181
> > >
> >
> >
> >
>
>


Memfault Beyond the Launch