|
Problems with a native code.(it's very important plis!): msg#00517hardware.microcontrollers.tini
Dear all: I write a native code that uses the timer 2 RSI, it works fine, but now i detect a problem with my aplication, then, I think that i don't restore the old RSI correctly. Can someone help me? it's very important and urgent! that's the code: OLDRSI EQU 44h ;INSTALL THE RSI AND STORE THE OLD RSI VECTOR AT "OLDRSI" Native_InstalarRSI: clr a mov R1_B0, #TICS ; inicialitzem els tics mov a, #0 mov @R1, a lcall NatLib_LoadPrimitive ; agafem el parametre mov R1_B0,#PARAM ; guardem el parametre mov a, R0 mov @R1, a mov R1_B0, #SYSTEM_INDIRECT_START ; inicialitzem la sortida mov a, #0 mov @R1, a ;PROGRAMACIO DEL TIMER2 mov a,#2Bh ;Instal.lar interrupcio push dps mov dps,#1 mov dptr,#timerRSI pop dps lcall System_InstallInterrupt mov a,#OLDRSI ; WELL?????? PUTX anl T2MOD, #0EFh anl CKCON, #0DFh ; T2: / 12 anl T2MOD, #0F7h anl T2MOD, #0FEh ; up count mov RCAP2L, #0Fh mov RCAP2H, #0FFh orl IE, #020h ; Enable Timer 2 interrupt mov T2CON, #04h ; Timer 2 run clr a ; indicate "no exceptions" ret Native_DesinstalarRSI: mov a,#0 anl IE,#0DFh ; Desabilitar interrupcio push dps mov dps,#1 mov a,#OLDRSI ; dptr= punter rutina original GETX pop dps mov a,#02Bh ; acc= offset timer2 lcall System_InstallInterrupt clr a ret Thanks for all. Lluis. _________________________________________________________________ Dale rienda suelta a tu tiempo libre. Encuentra mil ideas para exprimir tu ocio con MSN Entretenimiento. http://entretenimiento.msn.es/ _______________________________________________ TINI mailing list TINI-6tN4nzCoH/hBDgjK7y7TUQ@xxxxxxxxxxxxxxxx To UNSUBSCRIBE, edit your profile, or see list archives: http://lists.dalsemi.com/mailman/listinfo/tini |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: (no subject): 00517, Pierpaolo Vacalebri |
|---|---|
| Next by Date: | Stream Corrupted Exception: 00517, Aaron Minor |
| Previous by Thread: | How to program TINI 390 DS2433i: 00517, Pavel Parkhomenko |
| Next by Thread: | Re: Problems with a native code.(it's very important plis!): 00517, Thomas Chenot |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |