2005-06-16 03:46 AM
2005-04-04 09:41 AM
Hello.
I have a problem with ST10F168. After setting the Uprog bit to protect internal flash (beginning with adress 0) i receive class b interrupts with illegal opcode flag set. Without setting uprog bit all runs fine. Afer some tests i think the problem has to do with remapping my interrupt vektors. Has anybody ever had such a problem? I can not find any errors... The Interrupt Table starts at adress 0 in internal flash and there is a jump to external flash with external interrupt table (beginning at 0x8000). (As in the Tasking application notes. All interrupts jumps to an interrupt table in external flash instead of interrupt 0 = reset which activates some sort of boot program. The interrupt table of main program is generated by compiler C166 8.0r2 at specified adress.) How i said, the program with all these meachnism works fine with an unprotected mcu. If i protection is set it seems that there comes some undefined code somewehere... :( kindest regards, itsme @SET(RESET, 0h) @SET( VEC_RAM_START, 1) @SET( VEC_RAM_END, 127) @SET( MAXINT, 127) _vectab_base VTABLE PROC NEAR @SET(I,0) @WHILE (@I<=@MAXINT) @IF( @I==@RESET) JMPS SEG(__CSTART),SOF(__CSTART) @ELSE @IF ((@I>=@VEC_RAM_START) AND (@I<=@VEC_RAM_END)) JMPS SEG(_ram_table),SOF(_ram_table+4*@I) @ELSE JMPS SEG(VTABLE),SOF(VTABLE+4*@I) @ENDI @ENDI @SET(I,@I+1) @ENDW RETV VTABLE ENDP VECTABLE ENDS END2005-04-04 11:00 PM
2005-06-16 03:46 AM
The problem is solved but if you work with external AND internal Flash and internal Flash begins at Address Zero it is NOT possible to protect because the protection algorithm returns B88B instead of the right instruction after an interrupt occured while a program is running in external adress space...
That seems to be a mistake/error/disadvantage of the core.. :( (Theoretically it should be okay but practically it´s unuseful..)