CVS: jtag/funclets eraseFlash.S,1.7,1.8 eraseFlashSegment.S,1.5,1.6 progFlash.S,1.6,1.7

Chris Liechti <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/jtag/funclets
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6325/jtag/funclets

Modified Files:
	eraseFlash.S eraseFlashSegment.S progFlash.S 
Log Message:
set LOCK bit after flash access, this increases reliability for reads from Flash after Flash write/erase oprerations

Index: eraseFlash.S
===================================================================
RCS file: /cvsroot/mspgcc/jtag/funclets/eraseFlash.S,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- eraseFlash.S	30 Dec 2005 03:30:50 -0000	1.7
+++ eraseFlash.S	13 Apr 2006 20:14:01 -0000	1.8
@@ -41,7 +41,7 @@
 .LWait: dec     r10                     ; Loop requires 3 clock cycles.
         jnz     .LWait                  ;
         mov     #FWKEY, &FCTL1          ; Clear ERASE + MERAS bits.
-        mov     #FWKEY, &FCTL3          ; Clear BUSY + LOCK bits.
+        mov     #FWKEY|LOCK, &FCTL3     ; Clear BUSY, set LOCK bits.
         dec     r9                      ; Loop on erase cycles.
         jnz     .LAgain                 ;
 

Index: eraseFlashSegment.S
===================================================================
RCS file: /cvsroot/mspgcc/jtag/funclets/eraseFlashSegment.S,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- eraseFlashSegment.S	1 Feb 2006 23:59:11 -0000	1.5
+++ eraseFlashSegment.S	13 Apr 2006 20:14:01 -0000	1.6
@@ -57,7 +57,7 @@
 .LWait: dec     r10                     ; Loop requires 3 clock cycles.
         jnz     .LWait                  ; 
         mov     #FWKEY, &FCTL1          ; Clear ERASE + MERAS bits.
-        mov     #FWKEY, &FCTL3          ; Clear BUSY + LOCK bits.
+        mov     #FWKEY|LOCK, &FCTL3     ; Clear BUSY, set LOCK bits.
         dec     r9                      ; Loop on erase cycles.
         jnz     .LAgain                 ; 
 

Index: progFlash.S
===================================================================
RCS file: /cvsroot/mspgcc/jtag/funclets/progFlash.S,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -d -r1.6 -r1.7
--- progFlash.S	1 Feb 2006 23:59:11 -0000	1.6
+++ progFlash.S	13 Apr 2006 20:14:01 -0000	1.7
@@ -59,7 +59,7 @@
 .LWait: bit     #BUSY, &FCTL3           ; Wait for completion of write.
         jnz     .LWait                  ; Busy bit is cleared upon completion.
         mov     #FWKEY, &FCTL1          ; Reset writing to flash.
-        mov     #FWKEY, &FCTL3          ; Clear BUSY + LOCK bits.
+        mov     #FWKEY|LOCK, &FCTL3     ; Clear BUSY, set LOCK bits.
         cmp     @R10, 0(r9)             ; Verify written data.
         jne     stop                    ; Verification failure
 .LNext: incd    r10                     ; Advance source pointer.



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.