Forums

those crazy interrupts (2138)

Started by WadeA & RebeccaM Smith March 10, 2009
As soon as I enable the IRQs, pabort occurs.
If I comment out U1Initialize() -- no problem.

The code for uart1 is the same for uart0, with just the names changed to protect the ignorant.

Obviously I am missing something. What it is?
VIC assignments:

* Addr/Cntl 0 = timer0
* Addr/Cntl 1 = i2c (not enabled)
* Addr/Cntl 2 = spi (not enabled)
* Addr/Cntl 3 = timer1 (not enabled)
* Addr/Cntl 4 = uart0
* Addr/Cntl 5 = uart1
* Addr/Cntl 6 = RTC
* Addr/Cntl 7+= n/a

int main(void)
{
processorInit();
U0Initialize(19200);
U1Initialize(19200);
timerInit();
__ARMLIB_enableIRQ();
// main loop
while (1)
{
}
}

void U1Initialize(INTU32 baud)
{
/* Configure UART1 */
INTU32 dummy;
INTU32 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 = 27; /* slot 5 uart1 interrupt */
VICVectAddr5 = (INTU32)uart1ISR; /* ISR slot 5 */
VICIntSelect = 0; /* all interrupts vectored IRQ interrupts */
VICIntEnable = VIC_UART1; /* enable uart1 interrupt */
U1IER = U1IER_RBR_Interrupt_Enable;
dummy = U1IIR; /* Read IIR to clear interrupt "Just In Case" */
}

Any idea?

wade

An Engineer's Guide to the LPC2100 Series

On Tue, 10 Mar 2009, WadeA & RebeccaM Smith wrote:

> Obviously I am missing something. What it is?

Humor me- show me the prolgue for uart1ISR(), please.

-Kenny "betcha betcha betcha" Crudup

--
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
here's the whole function.

static void uart1ISR(void)
{
/* Read IIR to clear interrupt and find out the cause */
unsigned iir = U1IIR;

/* Handle UART interrupt */
switch ((iir >> 1) & 0x7)
{
case 1:
/* THRE interrupt */
break;
case 2:
/* RDA interrupt */
rxchar = U1RBR;
break;
case 3:
/* RLS interrupt */
break;
case 6:
/* CTI interrupt */
break;
}
}
--- In l..., Kenneth Crudup wrote:
> On Tue, 10 Mar 2009, WadeA & RebeccaM Smith wrote:
>
> > Obviously I am missing something. What it is?
>
> Humor me- show me the prolgue for uart1ISR(), please.
>
> -Kenny "betcha betcha betcha" Crudup
>
> --
> 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
>

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
You have probably been over this about a hundred times by now but, my
experience has been that the problem (like this) has usually been either
the PINSEL or the VIC assignments.

Off by a bit or something to that effect.

I also, mistakenly, assigned 2 interrupts to the same VIC address.

Also, 2 pins to the same function. Example....Pin xx is EINTx and pin xx
in the same EINTx.

Something stupid.

My 2 cents
> As soon as I enable the IRQs, pabort occurs.
> If I comment out U1Initialize() -- no problem.
>
> The code for uart1 is the same for uart0, with just the names changed to
> protect the ignorant.
>
> Obviously I am missing something. What it is?
> VIC assignments:
>
> * Addr/Cntl 0 = timer0
> * Addr/Cntl 1 = i2c (not enabled)
> * Addr/Cntl 2 = spi (not enabled)
> * Addr/Cntl 3 = timer1 (not enabled)
> * Addr/Cntl 4 = uart0
> * Addr/Cntl 5 = uart1
> * Addr/Cntl 6 = RTC
> * Addr/Cntl 7+= n/a
>
> int main(void)
> {
> processorInit();
> U0Initialize(19200);
> U1Initialize(19200);
> timerInit();
> __ARMLIB_enableIRQ();
> // main loop
> while (1)
> {
> }
> }
>
> void U1Initialize(INTU32 baud)
> {
> /* Configure UART1 */
> INTU32 dummy;
> INTU32 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 = 27; /* slot 5 uart1 interrupt */
> VICVectAddr5 = (INTU32)uart1ISR; /* ISR slot 5 */
> VICIntSelect = 0; /* all interrupts vectored IRQ interrupts */
> VICIntEnable = VIC_UART1; /* enable uart1 interrupt */
> U1IER = U1IER_RBR_Interrupt_Enable;
> dummy = U1IIR; /* Read IIR to clear interrupt "Just In Case" */
> }
>
> Any idea?
>
> wade

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
>

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
>
> /* 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
>>
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

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
>
>
>


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