请教各位高手:我的AT91RM9200板子,在ADS下LCD显示程序正常,移植到vxworks下,出现Data abort,Exception address:0x20027fcc,Current Processor Status Register: 0x60000013的错误。
出错的LCD部分程序如下:
void r_st(unsigned char w)
{
unsigned char volatile * Ptr_lcd_r;
unsigned int cd;
unsigned char c;
cd=1 << 28;
AT91F_PIO_ForceOutput(AT91C_BASE_PIOB,cd | 1 << 3 | 0 << 1);
while(1)
{
Ptr_lcd_r=(volatile unsigned char *)0x60000010;
c=*Ptr_lcd_r;
if ((w == 1) && ((c & 3) == 3)) return;
if ((w == 3) && (c & 8)) return;
}
}
void wdata(unsigned int cd_flag,unsigned char d)
{
unsigned char volatile * Ptr_lcd;
unsigned int cd;
cd=cd_flag << 28;
AT91F_PIO_ForceOutput(AT91C_BASE_PIOB,cd | 1 << 3 | 0 << 1);
Ptr_lcd=(volatile unsigned char *)0x60000000;
(* Ptr_lcd)=d;
}