Hello
could someone be so kind and say, what is wrong in following code? Or
maybe it is ok, but it doesn't work... I want trigger an interrupt
using UART0. I am using Keil. (UART0 is ok, it sends a string from tab).
thanks in advance
int i,j;
char tab[] = "UART0 is working properly";
void UART0INT() __irq
{
IO0CLR |= 0x20000; //clr P0.17 (it's a LED)
for(i=0;i<5;i++)
{
for(j=0;j<50000;j++){}
}
send_char_u0('A');
VICVectAddr = 0x00000000; //dummy write
}
int main(void)
{
PLL_ON();
LED_init();
VPBDIV = 0x1;
UART0_init();
IO0SET |= 0x20000; //set P0.17
send_string_u0(tab);
VICIntSelect = 0x00000000;
VICVectAddr0 = (unsigned) UART0INT;
VICVectCntl0 = 0x26; //UART0
VICIntEnable = 0x40; //bit 6 = UART0
while(1)
{
}
return 0;
}Message
interrupts + Keil + LPC2294
2006-03-21 by grodo2k
Attachments
- No local attachments were found for this message.