Liang Tao

A problem with mcf52235 UART interruption.Please help me.

Discussion created by Liang Tao on Sep 12, 2007
Latest reply on Sep 13, 2007 by Butcher
I am using a PCB made by myself.I initialize UART0 correctly.It transmit and receive well if i don't use interruption.I want to use interruption to receive data from computer.But no interruption is generated.I wrote my codes like this.Only critical parts is written .I think most registers must be initiated correctly or it can not work.
Could someone give me a hint?I really appreciate your help.

(CodeWarrior v6.4)
mcf5xxx_vectors.c

........
.extern _IntUART0m //Simply add a '_' before function name????
........
vector077:    .long    _IntUART0m   /* UART0 */
........

int_handler.c
__declspec(interrupt)
void IntUART0m(void)
{
    printf("03. UART interrupt entered! \n\r"); /* The charactors can be displayed in the console window */

}

int_init()
  MCF_INTC0_IMRL &= ~(0
    | MCF_INTC_IMRL_INT_MASK13 | MCF_INTC_IMRL_INT_MASK14 | MCF_INTC_IMRL_INT_MASK15
    | MCF_INTC_IMRL_MASKALL);
  MCF_INTC0_ICR13 = 0b00011011; //UART0
  MCF_INTC0_ICR14 = 0b00011011;
  MCF_INTC0_ICR15 = 0b00011011; //level and priority

uart_init() //UCSR and UIMR
  MCF_UART_UCSR(0) = (0|MCF_UART_UCSR_RCS_SYS_CLK | MCF_UART_UCSR_TCS_SYS_CLK);

  MCF_UART_UIMR(0) = (0 | MCF_UART_UISR_TXRDY |MCF_UART_UISR_FFULL_RXRDY );

main() // config SR at the beginning of main()
    asm
    {
        move.l  0x2000,D0
        move.w  D0,SR
    }

Outcomes