cancel
Showing results for 
Search instead for 
Did you mean: 

Power up checksum test not stable (ST10F269)

michael_glueck
Associate II
Posted on April 25, 2005 at 04:57

Power up checksum test not stable (ST10F269)

1 REPLY 1
michael_glueck
Associate II
Posted on April 25, 2005 at 04:57

Sometimes it is a little bit odd with this pocessor,

I try to perform a fairly simple checksum test of the internal flash once every power up. It is a bytewise XOR of all bytes in the range 0x0 to 0x07fff and from 0x20000 to 0x4ffff. This all happens before the task switcher is active and no interrupts are enabled. The result of this test seems not to be stable. I allways get 2-4 times the same result and then in most cases the MSB toggles. Less often I see the LSB changing. but the result is allways very similar. The result is held in internal registers during the procedure and written to external RAM when finished.

I really wonder why I get these unstable results, and I would be glad if someone has any ideas.

Here a part of the list file of the function:

***************************************************

; post.c 80 memCell = (unsigned int huge*)adress;

MOV R1,R13

MOV R2,R14

; post.c 81 temp = *memCell;

EXTS R2,#01h

MOV R1,[R1]

; post.c 83 checkSum ^= temp;

XOR R15,R1

; post.c 84 adress+= 2;

ADD R13,#02h

ADDC R14,#00h

ADD R12,#01h

CMP R12,#03FFFh

JMPR cc_ULE,_7

SRVWDT

ADD R8,#01h

CMP R8,#06h

JMPA cc_ULT,_6

****************************************************

The processor is running at 40Mhz and in total quite stable, so I do not see the problems from this end.

I am using Tasking, large mem model ... anyone any idea ?

:o

I just realised the assembler is a verion whith a 16bit XOR, not bytewise as I mentioned before. The same strange results...

[ This message was edited by: Micha01 on 26-04-2005 09:56 ]

Now I found the solution myself :)

The routine was not faulty, it actually was quite good showing me I do have a faulty FLASH :-W

This still makes me a little nervous since I do not beleave I reporgrammed the Processor 1000 times ...

Cheers Micha

[ This message was edited by: Micha01 on 06-05-2005 08:12 ]