We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am working on ARM 9 s3c2440 processor in mini2440 friendly board. for coding i am using keil MDK software. my code is
//#include<s3c44B0X.h> #include <S3C2440.H> #include<stdio.h> #define MCLK 50000000 #define BAUD_RATE 115200 #define BAUD_RATE_DIVISOR (int)((MCLK/(16*BAUD_RATE))-1) #define TXD0READY (1<<2) char data,flag=0,c = 'Y'; void serialport_init(void) { ULCON0 = 0x0003; // 8bits,1 stopbit, no parity UCON0 = 0x0005; //Rx or Tx Interrupt Polling mode UFCON0 = 0x00; // FIFO is not Enabled UMCON0 = 0x00; UBRDIV0= BAUD_RATE_DIVISOR; } void delay(int a) { for(;a!=0;a--) { } } static void __irq UART0_RX_INT(void) { pISR_UART0= (unsigned int)UART0_RX_INT; INTSUBMSK = 0xFFFFFFFF; //MASK ALL THE INTERRUPTS SUBSRCPND = 0x01; //Enable Recevie interrupt SRCPND = 0x10000000; //Enable UART0 interrupt INTPND = 0x10000000; c = URXH0; flag = 1; INTMSK &= ~(BIT_UART0); /* Enable UART0 interrupt */ } void uart_interrupt_init(void) { int i=0; INTMOD = 0x0; //All=IRQ mode INTMSK = BIT_ALLMSK; //All interrupt is masked. INTSUBMSK = BIT_SUB_ALLMSK; //All sub-interrupt is masked. <- April 01, 2002 SOP pISR_UART0= (unsigned int)UART0_RX_INT; SUBSRCPND = 0x1; SRCPND = (1<<28); //Enable UART0 interrupt INTPND = (1<<28); INTSUBMSK = 0xFFFFFFFE; // Enabling only RX input INTMSK &= ~(BIT_UART0); /* Enable UART0 interrupt */ pISR_UART0 = (unsigned int) UART0_RX_INT; } int main(void) { int i = 10; GPBCON = 0x015400; GPBUP = 0x7ff; serialport_init(); uart_interrupt_init(); while(1) { // transmitting a single character continuous for testing while (!(UTRSTAT0 & TXD0READY)); UTXH0 = c; // if a char is received via interrupt then blink the leds for certain time. if(flag == 1) { while(i ) GPBDAT = 0x0FFFFFFFF; delay(9000000); GPBDAT = 0x000000000; } else { GPBDAT = 0x0FFFFFFFFF; } } }
but i am getting Dummy_isr error, interrupt number: 28, INTMSK = 0xefff ffff i tried a lot but i am unable to solve this . plz help to come out of this, plz plz plz if possible provide the source code
What is a "mini2440 friendly board" ?
"i tried a lot"
What, exactly, did you try?
In particular, what preparation did you make before starting this project:
Have you familiarised yourself with the ARM9 architecture?
Have you familiarised yourself with the specific ARM9 chip?
Have you familiarised yourself with the Keil tools?
Have you familiarised yourself with the "mini2440 friendly board"?
Have you spent time studying any tutorials, examples, etc for any of this?