I need to download my code to target board which use ST10R167 as MCU and AM29F010 as external code memory.I use BSL mode of ST10, and I first start BSL mode by pull down P1.4 when power on, then send char "00" by UART,receive "ID",then download 32byte 1st start code to ST10R167,this code will receive next true appilcation code to internal RAM. when the application code size is below 332 bytes,everything is run ok, but if the code size over the limit, the aplication code run error(even self reset). I test it many times,even I just add some "NOP" instruction to a program that is below the limit and run well,but if over 332 size,the program will error(in my program,I place some debug code such as UART output,LED flash,when error happen,that will indicate the error) if anyone meet this problem? below is my 1st start code and app. code: 1st code(32 byte): LENTH EQU 228 ;>334 will be error START EQU 0xf700 RESET: nop mov R6,#START next: jnb S0RIR,$ BCLR S0RIR movb RL4,S0RBUF exts #0, #1 movb [R6],RL4 cmpi1 R6,#(START+LENTH-1) jmpr CC_C,next gotomain: JMPS #0,START app. code: #include <reg167.h> #include <absacc.h> #define uint unsigned int #define uchar unsigned char #define ulong unsigned long void main(void) { ulong i; //uchar j; uchar Rdata; //ulong adr24; ulong len24; SP=0xfc00; CP=0xfc00; BUSCON0=0x0400; SYSCON=0x0210; STKOV=0xfa0c; __asm {EINIT}; SS_com(0xaa); //UART output "0xaa" while(1) { .... } }