Dear Ti,
UCD3138A technical manual chapter 16 said ," First in the ROM program, the three address register(Memory Fine Base Address High Registers 1-3 (MFBAHRx)) pairs for the other memories are changed ."
"After the memory map is initialized in this pattern, the ROM program performs a simple additive checksum on the Program Flash."
"There should be no need to modify any of the memory base address registers."
But in load.asm in UCD3138A, there have the following code, change memory map.
c_int00
; B c_int00
LDR r13, c_sup_stack_top ; initialize supervisor stack pointer
LDR r4,c_mfbalr1_half0 ;point r4 at program flash base address register
MOV r0,#0x62 ;make block size 32K, address 0, read only
STRH r0,[r4]; store it there
LDR r0,c_mfbalr2_half0_load ;set up data flash for write only
STRH r0,[r4,#8] ;put it into mfbalr2
;*------------------------------------------------------
But when RUN the load.asm mean processor starts executing the flash program, in flash mode, why in flash mode run change memory map code? Have it been already execute in ROM mode?
Best Wishes