This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Thumb change alone

Hello ,

I'm using Keil µVision on a LPC2387.

Here's this strange behaviour :
From time to time, when going through the code __disable_irq();, the Thumb mode is cancelled, and then later it falls into an exception.

Do you have any idea about this ?

When it occurs it looks like an interrupt happened, (The debugger shows the Interrupt registers) but I could continue doing a step by step trace in the same code (One step from two is skipped)

extern QUEUE_TRANSFER entry_que(QUEUE_HANDLE channel, unsigned char *ptBuffer, QUEUE_TRANSFER Counter, unsigned char ucCallType, QUEUE_HANDLE DriverID)
{
    QUEQUE *ptQUEQue;
    QUEUE_TRANSFER rtn_val = 0;

    uDisable_Interrupt();                                                // disable all interrupts

    switch ( ucCallType ) {

...See printscreen at tech.voila.net/pb_thumb.jpg...

Parents
  • In fact the problem is not really with thumb/arm bit.

    The change is shown by the debugger because I enter an interrupt during the step by step mode.
    This interrupt change to ARM mode.

    The problem is the R14 register is pointing to the start of the stack interrupt at this moment.
    If I continue tracing, it reachs a Prefetch Abort.

    How the R14 register can be corrupted ?

Reply
  • In fact the problem is not really with thumb/arm bit.

    The change is shown by the debugger because I enter an interrupt during the step by step mode.
    This interrupt change to ARM mode.

    The problem is the R14 register is pointing to the start of the stack interrupt at this moment.
    If I continue tracing, it reachs a Prefetch Abort.

    How the R14 register can be corrupted ?

Children