Interrupt 5275EVB

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Interrupt 5275EVB

3,323件の閲覧回数
bizio
Contributor I
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

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

971件の閲覧回数
mvincent
Contributor I
Something to check: make sure you have programmed the interrupt controller's ICRs with unique interrupt level/priority. Also, make sure all the code and structures involved in the service routines are reentrant or in critical sections.
0 件の賞賛
返信

971件の閲覧回数
fire
Contributor I

hai,

I faced the same problem and i strugled for days.

The problem is with nesting of interrupts.If u are disabling the global interrupt any where, do it in the correct way.

let me know whether you are disabling the interrupts any where.Give me the correct details.

ALL THE BEST.

0 件の賞賛
返信