52233 based board runs for few Hours then hangs - debug info is:

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

52233 based board runs for few Hours then hangs - debug info is:

970 次查看
TVNAIDU
Contributor III

52233 based board runs for few Hours and then hangs, it is pointing to line 3 where it dies, any idea?

It is pointing to "ReadUSR1" - No address info available for variable

 

__declspec(interrupt:0)
void UART1_TXRX_ISR(void)
{
    uint8 ReadUSR1 = MCF_UART_USR(1);

    if(ReadUSR1&MCF_UART_USR_TXRDY)
    {
        if(UART1TxCounter)
        {
            UART1TxCounter--;
            MCF_UART_UTB(1) = *UART1TxPtr++;
        }
        else
        {
            MCF_UART_UCR(1) |= MCF_UART_UCR_TX_DISABLED;
        }       
    }

    if(ReadUSR1&MCF_UART_USR_RXRDY)
    {
        if(UART1RxPtr == &UART1RxBuffer[UART1RxBuffSize])
        {
            UART1RxPtr = &UART1RxBuffer[0];
        }
        *UART1RxPtr++ = MCF_UART_URB(1);
        UART1Status |= UARTByteReceived;
    }
}

标签 (1)
0 项奖励
回复
2 回复数

781 次查看
mjbcswitzerland
Specialist V

Hi

 

Assuming the hang is due to an exception take a look at the following guide to debugging:

http://www.utasker.com/forum/index.php?topic=123.msg468#msg468

 

Regards

 

Mark

 

0 项奖励
回复

781 次查看
TomE
Specialist II

I agree with Mark.

 

What is on the stack when it stops? The "stack trace" should show where it was, or possibly where it isn't. It is likely your stack pointer isn't valid. This is something you can check when it stops too - that and all the other CPU registers might show something interesting.

 

'Tom

 

0 项奖励
回复