This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Application did not start at 0x10000 on C167

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

  • Maybe a problem in the START167.A66 configuration file. Did you check all your address windows that are configured in this file?

  • I'm sorry, but I don't think there must be any differences between the start167.a66-file if the application starts from 0x20000 or 0x10000. The changes between the application at 0x20000 and 0x10000 in "target-window" and "Interrupt Vector Table Address" are done in the "options" sheet for the application. The start167.a66-file didn't change.
    Can you explain why the start167.a66 had to be changed?
    thanks a lot for you help.

  • It defines address windows for the various chip select signals.

  • I checked this an i think this could not be the problem. cs0 is used with the ext. flash,
    cs1 is disabled (and set to an adress not used (0x500000)), cs2 is used with the ram at adress 0x200000 (size 256K), cs3 is also disabled (and set to an adress not used (0x600000)) and cs4 is used for the nvram with adress 0x400000 (size 1024k).
    any other idea?
    thx for help

  • 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))
    ........................................
    

    FLASH_RESET is the start function of your flash-application.