• AVR Freaks

Hot!UART RX _general_exception_context

Author
richi_d
New Member
  • Total Posts : 22
  • Reward points : 0
  • Joined: 2011/04/29 02:48:16
  • Location: 0
  • Status: offline
2020/01/25 08:43:14 (permalink)
0

UART RX _general_exception_context

Hello,
I´m new to the PIC32MZ and I stuck now for hours on an exception error. It comes once I turn on the UArt1 RX Interrupt.
 
I already found that the program stucks here:
 
        ##################################################################
        # General Exception Vector Handler
        # Jumps to _general_exception_context
        ##################################################################
        .section .gen_handler,code
        .align 2
        .set noreorder
        .ent _gen_exception
_gen_exception:
0: la k0,_general_exception_context
        jr k0
        nop

        .end _gen_exception

 
I used the Exception handler from the Harmony, but this doesn´t work of curse it´s another routine name:
 
void _general_exception_handler(void)
    {
    _excep_code = (_CP0_GET_CAUSE() & 0x0000007C) >> 2;
    _excep_addr = _CP0_GET_EPC();

    _cause_str = cause[_excep_code];
    printf("\n\rGeneral Exception %s (cause=%d, addr=%x).\n\r", _cause_str, _excep_code, _excep_addr);

    while (1)
        {
#if defined(__DEBUG) || defined(__DEBUG_D) && defined(__XC32)
        __builtin_software_breakpoint();
#endif
        }
    }

 
I have no idea what is making the program stuck. How can I find out the problem. I have the Interrupt routines, I set the Multivektor Bit...  Let me know if you need more informations!
 
Thanks!
 
#1

1 Reply Related Threads

    richi_d
    New Member
    • Total Posts : 22
    • Reward points : 0
    • Joined: 2011/04/29 02:48:16
    • Location: 0
    • Status: offline
    Re: UART RX _general_exception_context 2020/01/25 08:54:50 (permalink)
    +2 (2)
    Found it, the Priority in the
     
    IPC9bits.U1RXIP = 5;
     
    The ISR was
     
    void __ISR(_UART1_RX_VECTOR, IPL3AUTO) UART1_RX_Handler(void)
     
    pink: pink
    #2
    Jump to:
    © 2020 APG vNext Commercial Version 4.5