This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123GXL堆栈保护问题



void
USBUARTIntHandler(void)
{
uint32_t ui32Ints;
uint32_t transmitCmd=0;

//
// Get and clear the current interrupt source(s)
//
ui32Ints = ROM_UARTIntStatus(UART2_BASE, true);
ROM_UARTIntClear(UART2_BASE, ui32Ints);

//
// Are we being interrupted because the TX FIFO has space available?
//
if(ui32Ints & UART_INT_TX)
{
//
// Move as many bytes as we can into the transmit FIFO.
//
}

//
// Handle receive interrupts.
//
if(ui32Ints & (UART_INT_RX | UART_INT_RT))
{
//
// Read the UART's characters into the buffer.
//
transmitCmd=ReadUARTData();
}

if(transmitCmd==1)

{
(*((void (*)(void))(*(uint32_t *)0x04)))();

}
}

上面是个串口中断入口程序,结尾处通过判断transmitCmd==1后进行了地址跳转(*((void (*)(void))(*(uint32_t *)0x04)))();,请问如何在跳转前如何解决堆栈破坏问题??急求解答,谢谢