Fabrizio Caucci

Interrupt 5275EVB

Discussion created by Fabrizio Caucci on Jun 19, 2006
Latest reply on Jun 21, 2006 by Marc Vincent
Hi all,
I'm working with 5275EVB.I have a problem with the management of the interrupts generated by the UARTs. The source code used to inizialize the UARTs is the following:

MCF_UART_UCR1 = MCF_UART_UCR_RESET_TX;
MCF_UART_UCR2 = MCF_UART_UCR_RESET_TX;

MCF_UART_UCR1 = MCF_UART_UCR_RESET_RX;
MCF_UART_UCR2 = MCF_UART_UCR_RESET_RX;

MCF_UART_UCR1 = MCF_UART_UCR_RESET_MR;
MCF_UART_UCR2 = MCF_UART_UCR_RESET_MR;

MCF_UART_UMR1 = (0
| MCF_UART_UMR_PM_NONE
| MCF_UART_UMR_RXIRQ
| MCF_UART_UMR_BC_8 );
MCF_UART_UMR2 = (0
| MCF_UART_UMR_PM_NONE
| MCF_UART_UMR_RXIRQ
| MCF_UART_UMR_BC_8);

MCF_UART_UMR1 = (0
| MCF_UART_UMR_CM_NORMAL
| MCF_UART_UMR_SB_STOP_BITS_1);
MCF_UART_UMR2 = (0
| MCF_UART_UMR_CM_NORMAL
| MCF_UART_UMR_SB_STOP_BITS_1);

MCF_UART_UCSR1 = (0
| MCF_UART_UCSR_RCS_SYS_CLK
| MCF_UART_UCSR_TCS_SYS_CLK);
MCF_UART_UCSR2 = (0
| MCF_UART_UCSR_RCS_SYS_CLK
| MCF_UART_UCSR_TCS_SYS_CLK);


MCF_UART_UIMR1 = MCF_UART_UIMR_RXRDY_FU;

MCF_UART_UISR1 = MCF_UART_UISR_RXRDY_FU;

MCF_UART_UIMR2 = MCF_UART_UISR_RXRDY_FU;

MCF_UART_UISR2 = MCF_UART_UISR_RXRDY_FU;


ubgs = (uint16)((SYSTEM_CLOCK*1000000)/(9600 * 32));

MCF_UART_UBG1(1) = (uint8)((ubgs & 0xFF00) >> 8);
MCF_UART_UBG2(1) = (uint8)(ubgs & 0x00FF);

ubgs = (uint16)((SYSTEM_CLOCK*1000000)/(4800 * 32));

MCF_UART_UBG1(2) = (uint8)((ubgs & 0xFF00) >> 8);
MCF_UART_UBG2(2) = (uint8)(ubgs & 0x00FF);


MCF_UART_UCR1 = (0
| MCF_UART_UCR_TX_ENABLED
| MCF_UART_UCR_RX_ENABLED);
MCF_UART_UCR2 = (0
| MCF_UART_UCR_TX_ENABLED
| MCF_UART_UCR_RX_ENABLED);

At the beginning it runs correctly, but after some interrupts received the CodeWarrior goes on error.
The error is "Address Error".
Someone can help me to resolve this error?
Thank you in advance for your help.

Message Edited by bizio on 2006-06-19 03:17 AM

Outcomes