Hello,
I am trying to handle the exception, so that i created c function & called that c function from exception.S file but
my system is getting restarted, please anybody suggest something.
#if !__AVR32_UC__ && !__AVR32_AP__
#error Implementation for the AVR32 architecture only.
#endif
#include <avr32/io.h>
//! @{
//! \verbatim
.section .exception, "ax", @progbits
// Start of Exception Vector Table.
/*
* EVBA must be aligned with a power of two strictly greater than the
* EVBA-relative offset of the last vector.
*/
.balign 0x200
// Export symbol.
.global _evba
.type _evba, @function
_evba:
.org 0x000
// Unrecoverable Exception.
_handle_Unrecoverable_Exception:
mov r8, 3
rjmp isr_exception
.org 0x004
// TLB Multiple Hit.
_handle_TLB_Multiple_Hit:
mov r8, 4
rjmp isr_exception
.org 0x008
// Bus Error Data Fetch.
_handle_Bus_Error_Data_Fetch:
mov r8, 5
rjmp isr_exception
.org 0x00C
// Bus Error Instruction Fetch.
_handle_Bus_Error_Instruction_Fetch:
mov r8, 6
rjmp isr_exception
.org 0x010
// NMI.
_handle_NMI:
mov r8, 7
rjmp isr_exception
.org 0x014
// Instruction Address.
_handle_Instruction_Address:
rjmp $
.org 0x018
// ITLB Protection.
_handle_ITLB_Protection:
rjmp $
.org 0x01C
// Breakpoint.
_handle_Breakpoint:
rjmp $
.org 0x020
// Illegal Opcode.
_handle_Illegal_Opcode:
rjmp $
.org 0x024
// Unimplemented Instruction.
_handle_Unimplemented_Instruction:
rjmp $
.org 0x028
// Privilege Violation.
_handle_Privilege_Violation:
rjmp $
.org 0x02C
// Floating-Point: UNUSED IN AVR32UC and AVR32AP.
_handle_Floating_Point:
rjmp $
.org 0x030
// Coprocessor Absent: UNUSED IN AVR32UC.
_handle_Coprocessor_Absent:
rjmp $
.org 0x034
// Data Address (Read).
_handle_Data_Address_Read:
rjmp $
.org 0x038
// Data Address (Write).
_handle_Data_Address_Write:
rjmp $
.org 0x03C
// DTLB Protection (Read).
_handle_DTLB_Protection_Read:
rjmp $
.org 0x040
// DTLB Protection (Write).
_handle_DTLB_Protection_Write:
rjmp $
.org 0x044
// DTLB Modified: UNUSED IN AVR32UC.
_handle_DTLB_Modified:
rjmp $
.org 0x050
// ITLB Miss.
_handle_ITLB_Miss:
rjmp $
.org 0x060
// DTLB Miss (Read).
_handle_DTLB_Miss_Read:
rjmp $
.org 0x070
// DTLB Miss (Write).
_handle_DTLB_Miss_Write:
rjmp $
.org 0x100
// Supervisor Call.
_handle_Supervisor_Call:
rjmp $
isr_exception:
st.w --sp,sp
pushm r0-r7,lr
bral _Exception
_Exception is my c function
my question is that why my system is getting restarted?