flashing works, sample betty fw announcing itself :)
[my-code/arm.git] / betty / fwflash.c
index ebf7190..7c9551f 100644 (file)
@@ -364,7 +364,8 @@ int receive_data_and_write_to_flash(u32 addr,u32 datalen) {
        unlock_bypass_reset(bank);
 
        /* modify cksm on purpose, so the user knows ... */
-       cksm+=1;
+       if(ret==-1)
+               cksm+=1;
 
        /* send the cksm */
        uart0_send_byte(cksm);