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

STR912FAW44

Hi,
I am using STR9FAW44, and I get an external interrupt from WIU line 18(GPIO P6.2 pin). When CPU gets an interrupt from this pin it halts, it does not give any reaction. When I debug, it goes into interrupt routine, but when it returns from the intterrupt routine it jumps a memory address where includes some absurd things. Then it does noting.

What may be the cause of this problem?

Parents Reply Children
  • Thank you Per for your reply.
    The stack sizes are as follows:

    UND_Stack_Size  EQU     0x00000000
    SVC_Stack_Size  EQU     0x00000008
    ABT_Stack_Size  EQU     0x00000000
    FIQ_Stack_Size  EQU     0x00000000
    IRQ_Stack_Size  EQU     0x00000100
    USR_Stack_Size  EQU     0x00000400
    ISR_Stack_Size  EQU     (UND_Stack_Size + SVC_Stack_Size + ABT_Stack_Size + \ 
                             FIQ_Stack_Size + IRQ_Stack_Size)
    
                    AREA    STACK, NOINIT, READWRITE, ALIGN=3
    
    Stack_Mem       SPACE   USR_Stack_Size
    __initial_sp    SPACE   ISR_Stack_Size
    
    Stack_Top
    
    
    ;// <h> Heap Configuration
    ;//   <o>  Heap Size (in Bytes) <0x0-0xFFFFFFFF>
    ;// </h>
    
    Heap_Size       EQU     0x00000000
    
                    AREA    HEAP, NOINIT, READWRITE, ALIGN=3
    __heap_base
    Heap_Mem        SPACE   Heap_Size
    __heap_limit
    

  • Hi all,
    I can't still fix the problem. I increased stack sizes and
    tried again, but still problem exists. I rearrange my question and ask: I am using ST library v2.0 and I am trying get an interrupt from an external device(serocco-m serial controller). When an interrupt triggered, cpu jumps
    to the irq handler. Everything is normal until here, however strange things occurs when the cpu returns from IRQ handler. Some times it halts, jumps a strange address, some times it resets the whole system.

    best regards
    Ramazan Arikan,

  • ok. what do you do inside the ISR? maybe you are causing a stack overflow there?

  • when you enter your ISR, is the value of the LR register correct?