Attached you will find a patch to fix issues with accessing flash on newer
version ATSAM3 processors.  Essentialy it masks out the version number of
the processor when doing a lookup of the CIDR number in the detail table.

Regards

Olivier Schonken
From a0cd952d825586f27f905b3b631a612f88b94c93 Mon Sep 17 00:00:00 2001
From: Olivier Schonken <olivier.schon...@gmail.com>
Date: Mon, 28 Mar 2011 19:31:17 +0200
Subject: [PATCH] Modified cidr comparisson to ignore version bits - production 
processor versions increment, thus the version bits should be ignored for 
future proofing.
 e.g. Engineering sample version == 0x00, production version 0x01

---
 src/flash/nor/at91sam3.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c
index 0b71e81..40ff3aa 100644
--- a/src/flash/nor/at91sam3.c
+++ b/src/flash/nor/at91sam3.c
@@ -1999,7 +1999,8 @@ sam3_GetDetails(struct sam3_bank_private *pPrivate)
        LOG_DEBUG("Begin");
        pDetails = all_sam3_details;
        while (pDetails->name) {
-               if (pDetails->chipid_cidr == pPrivate->pChip->cfg.CHIPID_CIDR) {
+               // Compare cidr without version bits
+               if (pDetails->chipid_cidr == (pPrivate->pChip->cfg.CHIPID_CIDR 
& 0xFFFFFFE0)) {
                        break;
                } else {
                        pDetails++;
-- 
1.7.4

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to