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

User Code Signature for DS80C400

I have a DS80C400 with external Flash ROM and external SRAM.

I have succesfully generated a HEX file with the Keil compiler and can run this when the nEA pin is low. (Disables access to built in ROM functions)

However I wish to use the built in bootloader and (according to the DS80C400 datasheet Table 12 [page 70]) I therefore need to have the nEA pin pulled high so that the bootloader will operate when required.

My problem occurs when I go through the bootloader and enter the command 'E' to trigger the find user code routine, I am presented with the error "No User Code, Halting System".

For this to operate my bank of code needs to begin with an SJMP to bypass the signature byte and then have a signature of the four ascii bytes T I N and I.

Q1. Does Keil have the facility to insert this signature byte?

Q2. Would such a signature interfere with the ISR lookup table which I beleive to be stored at the start of the ROM?

  • Just incase anyone else comes across the same problem I have found out from Dallas that application note 613 has the solution to this problem.
    This can be found at the following location.

    http://www.maxim-ic.com/appnotes.cfm/appnote_number/1986

    following advice from this sheet I have modified the startup.a51 reset vector code as follows:

    FLASH_BANK EQU 20H	; which address range is the ROM stored in
    
    
    ?C_CPURESET?0	SEGMENT CODE OFFS 0
    		RSEG	?C_CPURESET?0
    
    ?C_STARTUP 	LABEL	NEAR
    		SJMP BYPASS_SIG		; bypass the following signature
    
    		DB 'TINI'			; signature to identify bank as executable (see AN615 for further details)
    		DB FLASH_BANK		; specify target bank
    
    BYPASS_SIG:
    		DB	02H				; LJMP in 24 bit mode
    ; following line is not ideal solution but works for some situations
    		DB  FLASH_BANK		; cheating here to simulate 24 bit from 16 bits
    		DW	WORD0 STARTUP1
    		RSEG	?C_C51STARTUP