Hi All, I recognized that I have an interrupt problem. I can't get into the vector both after receive or transmit. I checked all the initialized VIC registers I couldn'T find the error. Please help.
Here is the Init:
/*INIT*/ void serial_init (void) { // PINSEL0 = 0x00050000; /* Enable RxD1 and TxD1 */ PINSEL0 |= 0x00000005; /// UART0 U0FCR=0x01; ///Enable FIFOS and reset U0LCR = 0x83; ///DLAB=1 U0DLL = 0x20; /// 115200 baud U0DLM = 0x00; U0LCR = 0x03; /// 8 bits, no Parity, 1 Stop bit ve DLAB=0 yapılıyor */ U0IER = 0x03; /// Enable RDA and THRE interrupts */ VICVectAddr14 = (U32)int_serial; /// 14th vector is serial interrupt VICVectCntl14 = 0x27; /// enable vect14 and assign IRQ number 7 VICIntEnable |= 0x80; /// IRQ 7 enable
I managed to get into the interrupt vector. I used IRQ6 instead of IRQ7 for UART0. I don't know why and how .. but it works.
Can anybody explain this situation?
I think your problem is VICIntEnable |= 0x80; /// IRQ 7 enable This is not for IRQ enable but for UART0 interrupt as IRQ enable and it is bit 6 of VICIntEnable .
Once enabled you may assign it to any IRQ.
Sorry. I didn't understand.
UART0 is vercto number 6 not 7. so,
VICVectCntl14 = 0x26; VICIntEnable |= 0x40;
Try this.
Thanks Dimple