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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

481 Views
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;
    }
}

Labels (1)
0 Kudos
2 Replies

292 Views
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 Kudos

292 Views
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 Kudos