Keil Logo Arm Logo

Problems with Code in internal and external Flash

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Alex Haas
Posted
23-Feb-2005 09:22 GMT
Toolset
C166
New! Problems with Code in internal and external Flash
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)! 

I have checked th memory and there is really a FFH at this address. The M66-file shows Code there!!
Does Keil abort the flash-operation???

If I flash the Code only in the external ROM, it works fine.

Any ideas???
Thanks
Alex
Read-Only
Author
Matthias Hertel
Posted
23-Feb-2005 16:57 GMT
Toolset
C166
New! RE: Problems with Code in internal and external Flash
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.
Read-Only
Author
Alex Haas
Posted
24-Feb-2005 07:18 GMT
Toolset
C166
New! RE: Problems with Code in internal and external Flash
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
Read-Only
Author
Matthias Hertel
Posted
24-Feb-2005 08:06 GMT
Toolset
C166
New! RE: Problems with Code in internal and external Flash
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?
Read-Only
Author
Alex Haas
Posted
24-Feb-2005 08:48 GMT
Toolset
C166
New! RE: Problems with Code in internal and 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

The error is:
Contents missmatch at: 012D80H (Falsh=FFH Required=3DH)

The error occurs in the "variablen"-file, but if I change the last file the error is still there.
I think the problem is not a file, because I can load every file at the end of the external code and nothing works.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings