This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Data Abort: ARM Instruction at 0000012CH, Memory Access at FFE08000H

hi all

I am using LPC2368 processor, i written following code to impliment the RS232 in UART0,but i am getting above message while debugging. please let me know whats wrong here...

/*************************************************************************************************/

#include "LPC23xx.h" /* LPC23xx definitions */
#include "uart.h"

void UART1Handler (void)__irq ;
void UARTSend(BYTE *BufferPtr, DWORD Length );
void Uart_transmit (char *data);
void UARTInit(unsigned long baudrate);

void UART1Handler (void)__irq
{ unsigned char IIRValue, LSRValue;

unsigned char Dummy = Dummy;

IIRValue = U0IIR;

IIRValue >>= 1;

IIRValue &= 0x07;

if ( IIRValue == IIR_RLS )

{

LSRValue =U0LSR;

if ( LSRValue & (LSR_OE|LSR_PE|LSR_FE|LSR_RXFE|LSR_BI) )

{

UART1Status = LSRValue;

Dummy = U0RBR;

VICVectAddr = 0;

return;

}

if ( LSRValue & LSR_RDR )

{

UART1Buffer[UART1Count] = U0RBR;

UART1Count++;

if ( UART1Count == BUFSIZE )

{

UART1Count = 0;

}

}

}

else if ( IIRValue == IIR_RDA )

{

UART1Buffer[UART1Count] = U0RBR;

UART1Count++;

if ( UART1Count == BUFSIZE )

{

UART1Count = 0;

}

}

else if ( IIRValue == IIR_CTI )

{

UART1Status |= 0x100;

}

else if ( IIRValue == IIR_THRE )

{

LSRValue = U0LSR;

if ( LSRValue & LSR_THRE )

{

UART0TxEmpty = 1;

}

else

{

UART0TxEmpty = 0;

}

}

VICVectAddr = 0;

}

void UARTSend(BYTE *BufferPtr, DWORD Length)

{

while ( Length != 0 )

{

while ( !(UART0TxEmpty & 0x01) );

U0THR = *BufferPtr;

UART0TxEmpty = 0;

BufferPtr++;

Length--;

}

}

void Uart_transmit (char *data)

{

while (*data)

{

U0THR=*data++;

}

U0THR=0x0A;

}

void UARTInit(unsigned long baudrate)

{

unsigned long Fdiv;

PINSEL0=0X00000050;

U0LCR = 0x83;

Fdiv = (Fpclk/16)/baudrate ;

U0DLM = Fdiv / 256;

U0DLL = Fdiv % 256;

U0LCR = 0x03;

U0FCR = 0x07;

VICIntEnClr = 1 << 6;

VICVectAddr6 = (unsigned long )UART1Handler;

VICVectCntl6 = 0x01;

VICIntEnable |= 1 << 6;

U0IER = IER_RBR | IER_THRE | IER_RLS;
}

int main (void)

{

PINSEL10 = 0;

PINSEL4=0X00000000;

FIO2DIR |= 0x000000FF;

FIO2PIN |= 0x00000001;

UARTInit(9600);

Uart_transmit("abcdef");

while (1)

{

if ( UART1Count == 0 )

{
U0IER = IER_THRE | IER_RLS;

UARTSend((BYTE *)UART1Buffer, UART1Count );

UART1Count = 0;

U0IER = IER_THRE | IER_RLS | IER_RBR;

}

}

return 0;
}

0