I am in need of some help. I have a MCB167-NET board (configured as 16 bit addressing), which contains a 2xFlash modules from AMD (AM29F040B). I am writing my own Bootloader to copy my program to external RAM, erase and then the program it to the flash. The following code on chip erase (with AMD ERASE algorithm) works on 8-bit non-multiplexing mode. However, how do I get it modified to erase and program the FLASH in 16 bit addressing?? ---------------------------------------------
ERASE_FLASH: MOV DPP2,#0001H ;write 0xAA to [0x5555]
MOV R12,#09555H
MOVB RL1,#00AAH
MOV [R12], RL1
MOV DPP2,#0000H ;write 0x55 to [0x2AAA]
MOV R12,#0AAAAH
MOVB RL1,#0055H
MOV DPP2,#0001H ;write 0x80 to [0x5555]
MOVB RL1,#0080H
MOV DPP2,#0001H ;write 0xAA to [0x5555]
MOV DPP2,#0001H ;write 0x10 to [0x2AAA]
MOVB RL1,#0010H
MOV R13,#09555H
MOVB RL2,#80H ;wait till erase is ok by polling
CALLR ERASE_POLL
MOV R4,#ERASE_OK