I'am working on a custom board, based on XC167CI with external flash AMD 29F400 wired to CS0 and we are using Keil uVision9 V3.02 ULINK USB. So we have internal memory at 0xC00000 and external one at 0x00000. I have to split the code in internal and external code because of speed performance and size. The XC167 starts external. Most of the code is locate in the external flash, only fast calculations are in internal memory. The flash-operation with Keil seems to be OK, but during the verify a problem occurs.
Contents missmatch at: 01D080H (Flash=FFH Required=0DH)!
Do you have a second board to test? Did you check if the flash device itself is probably broken? Maybe the testing program in this application note: http://www.keil.com/appnotes/docs/apnt_186.asp, can help you to check your flash device. Originally it is made to help you developing a new algorithm, but you may use it to check a flash device with an existing algorithm, too.
Thanks for your reply. I have many Boards tested and on every Board occurs the same error. The flash-device is OK. If I flash only internal flash it works and if I flash only external flash it works too. If I flash the code extern and intern I load some constants it works, but if I load some code extern and intern it doesn't work. The error occurs every time at the end of the external code during the verify. Approximately the last 20 Bytes were not correct. Whatever I do with the code size the error occurs at the last 15-20 Bytes. Do you have any other ideas? Thanks. Alex
Can you have a look into the map file. What is in this address range, that you cannot flash? Do you have own routines inside your program, that may write to the external flash?
Here are some lines from my map file:
012712H 0129E1H 0002D0H CODE REL WORD --- --- PUBL FCODE ?C_LIB_CODE 0129E2H 012BF3H 000212H CODE REL WORD --- --- PUBL FCODE ?PR?TRACE 012BF4H 012D8BH 000198H CODE REL WORD --- --- PUBL FCODE ?PR?VARIABLEN 300000H 3001FFH 000200H DATA REL WORD --- 1 PUBL NDATA ?C_USERSTACK 300200H 30021FH 000020H DATA REL WORD --- 1 PUBL NDATA ?C_USERSTACK1 300220H 30023FH 000020H DATA REL WORD --- 1 PUBL NDATA ?C_USERSTACK2
Contents missmatch at: 012D80H (Falsh=FFH Required=3DH)