hi, i hope i'm right here and someone can help me: I am using a C167CS with 2x 128k x8 flash (ST29F040BB) on the external 16 bit demultiplexed bus (with WRL&WRH). Flash is connected to CS0 (segment 0-3 , address 0x0-0x3ffff). Address 0x0 in segment 0 is used for a 8kbyte flash-program, used to flash the application-program via CAN to the extern flash in segment 2+3 (0x2000-0x3ffff) and starts the application after reset (if no hardware flash-condition is set) with a jump to the application (to adress 0x20000). This works fine. But now the application is getting bigger than 128k an I want to start at segment 1 (0x10000) and use segment 1-3. Flashing works, a readout of the flash confirmed me, that the application program is at address 0x10000 to 0x3ffff. But after the jump from the flash-routine to the application-program (to 0x10000) after reset, the application did not start correctly. of course I change the the memory-settings at the target-dialog, change the vectab-adress of application to 0x10000 and change the jump-adress in flash-application to 0x10000; After that I generate the hole projekt new. Any idea, what can go wrong? Thanks for your help. Regards Michael
Because you changed the vectab address of application to 0x10000 you need to correct the vectab code of your 8kbyte flash-program, if your application uses interrupts. I.e. you need to redirect interruption's call from flash-program to your application so you must write the vectab started from 0x0000 yourself. For example:
EXTERN FLASH_RESET : FAR REDIR_APP_VECTAB EQU 010000h VECTOR_TAB SECTION CODE AT 0h VECTOR_TAB_PROC PROC FAR JMPS SEG FLASH_RESET, (FAR PTR FLASH_RESET + (4*00h)) JMPS SEG REDIR_APP_VECTAB, (FAR PTR REDIR_APP_VECTAB + (4*01h)) ........................................