This is an automated email from Gerrit.

Andrey Skvortsov (andrej.skvort...@gmail.com) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/3509

-- gerrit

commit 7259d34b14d00fe7724fa3ee2154eab03e3d4094
Author: Andrey Skvortsov <andrej.skvort...@gmail.com>
Date:   Wed May 25 13:11:18 2016 +0300

    flash: nor: mdr: fix verification problem with 1986VE1T or 1986VE3T
    
    1986VE1T and 1986VE3T have issue with flash acceleration engine described
    in their errata (issue 0007).
    After programming flash acceleration engine's buffer contains old data,
    and therefore first read data are wrong. Because of this verification after
    programming fails always. Recommended workaround for the issue is to flush
    flash accelerator's buffer. To do so it's necessary to read at least 64
    bytes of flash through accelerator.
    
    Reading bytes through JTAG using default_flash_read doesn't help.
    It seems that reading should be done by uC itself.
    
    Change-Id: I18ef464a68ad5c5b16d3933f31ca61f8e2e7cca3
    Signed-off-by: Andrey Skvortsov <andrej.skvort...@gmail.com>

diff --git a/src/flash/nor/mdr.c b/src/flash/nor/mdr.c
index c402e64..5992f9a 100644
--- a/src/flash/nor/mdr.c
+++ b/src/flash/nor/mdr.c
@@ -471,6 +471,13 @@ free_buffer:
        if (new_buffer)
                free(new_buffer);
 
+       /* read some bytes bytes to flush buffer in flash accelerator.
+        * See errata for 1986VE1T and 1986VE3. Error 0007 */
+       if (!mdr_info->mem_type) {
+               uint32_t tmp;
+               target_checksum_memory(bank->target, bank->base, 64, &tmp);
+       }
+
        return retval;
 }
 

-- 

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to