We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'am working with at91sam7x256 and in my program the usart interrupt dosen't work correctly ! I communicatinon with atmel but it isn't fix yet.
thise is my program...pleas help me
www.4shared.com/.../usart16__2_.html
my mail :salehi.elc@gmail.com
and some important part of our start up:
UND_Stack_Size EQU 0x00000000 SVC_Stack_Size EQU 0x00000100 ABT_Stack_Size EQU 0x00000000 FIQ_Stack_Size EQU 0x00000000 IRQ_Stack_Size EQU 0x00000080 USR_Stack_Size EQU 0x00000400 IRQ_Handler ldr r14, =AT91C_BASE_AIC ; ldr r0, [r14, #AIC_IVR] ;bx r0 ;sub r14, r14, #4 ;stmfd sp!, {r0-r3, r12, r14} ;ldr r14, =AT91C_BASE_AIC ;ldr r0, [r14, #AIC_IVR] ;bx r0 ; ldr r14, =AT91C_BASE_AIC ; str r14, [r14, #AIC_EOICR] ; ldmfd sp!, {r0-r3, r12, pc}^ ;Save interrupt context on the stack to allow nesting */ SUB lr, lr, #4 STMFD sp!, {lr} MRS lr, SPSR STMFD sp!, {r0,r1,lr} ; Write in the IVR to support Protect Mode */ LDR lr, =AT91C_BASE_AIC LDR r0, [r14, #AIC_IVR] STR lr, [r14, #AIC_IVR] ; Branch to interrupt handler in Supervisor mode */ MSR CPSR_c, #ARM_MODE_SVC STMFD sp!, {r1-r4, r12, lr} MOV lr, pc BX r0 LDMIA sp!, {r1-r4, r12, lr} MSR CPSR_c, #ARM_MODE_IRQ | I_BIT ; Acknowledge interrupt */ LDR lr, =AT91C_BASE_AIC STR lr, [r14, #AIC_EOICR] ; Restore interrupt context and branch back to calling code LDMIA sp!, {r0,r1,lr} MSR SPSR_cxsf, lr LDMIA sp!, {pc}^ ; Reset Handler EXPORT Reset_Handler