Hi all,
I am developing program for UART0 with Interrupt.
void uart_init(void); void uart_transmit(void); void uart_interrupt_init(void); void dely(U32 tt); static void __irq Uart0RxInt(void); char data,flag=0; static void __irq Uart0RxInt(void) { INTSUBMSK = 0xFFFFFFFF; SUBSRCPND = 0x1; SRCPND |= 0x10000000; INTPND = 0x10000000; data = rURXH0; flag = 1; GPBDAT=0xFFFFFFFF; dely(12); GPBDAT=0x00000000; dely(12);*/ } void dely(U32 tt) { U32 i; for(;tt>0;tt--) { for(i=0;i<10000;i++){} } } int Main(int argc, char **argv) { int i; U8 key; U32 mpll_val=0; int data; unsigned int k,l; mpll_val = (92<<12)|(1<<4)|(1); MMU_DisableICache(); MMU_DisableDCache(); GPBCON = 0x155555; GPHCON |= 0xAA; uart_init(); uart_interrupt_init(); while(1) { while(flag!=1); uart_transmit(); flag=0; } INTSUBMSK = 0xFFFFFFFF; INTMSK = 0xFFFFFFFF; } void uart_init(void) { ULCON0 |= 0x00000003; UCON0 |= 0x00000005; UMCON0 = 0x00; UFCON0 = 0x00; UBRDIV0=329; // 9600 //UBRDIV0=27; // 115200 } void uart_interrupt_init(void) { pISR_UART0 = (unsigned int)Uart0RxInt; SUBSRCPND = 0x1; SRCPND = (1<<28); INTPND = (1<<28); INTSUBMSK = 0xFFFFFFFE; INTMSK = 0xEFFFFFFF; } void uart_transmit(void) { while((UTRSTAT0&0x00000002)==0); UTXH0=data; }
. when i download the code & run, it gives Dummy_isr error. please help me