Kinetis: new devices K02, K26, K63, K64, K66, correct K21 and K22 variants
[openocd.git] / src / flash / nor / nrf51.c
index af412e2827565ac83ff09213cc05c636624bf7a0..7c2fa13f55844e57bd96670ca7ff7abd3585e9f0 100644 (file)
@@ -128,23 +128,62 @@ struct nrf51_device_spec {
        unsigned int flash_size_kb;
 };
 
+/* The known devices table below is derived from the "nRF51 Series
+ * Compatibility Matrix" document, which can be found by searching for
+ * ATTN-51 on the Nordic Semi website:
+ *
+ * http://www.nordicsemi.com/eng/content/search?SearchText=ATTN-51
+ *
+ * Up to date with Matrix v2.0, plus some additional HWIDs.
+ *
+ * The additional HWIDs apply where the build code in the matrix is
+ * shown as Gx0, Bx0, etc. In these cases the HWID in the matrix is
+ * for x==0, x!=0 means different (unspecified) HWIDs.
+ */
 static const struct nrf51_device_spec nrf51_known_devices_table[] = {
+       /* nRF51822 Devices (IC rev 1). */
        {
                .hwid           = 0x001D,
                .variant        = "QFAA",
                .build_code     = "CA/C0",
                .flash_size_kb  = 256,
        },
+       {
+               .hwid           = 0x0026,
+               .variant        = "QFAB",
+               .build_code     = "AA",
+               .flash_size_kb  = 128,
+       },
+       {
+               .hwid           = 0x0027,
+               .variant        = "QFAB",
+               .build_code     = "A0",
+               .flash_size_kb  = 128,
+       },
+       {
+               .hwid           = 0x0020,
+               .variant        = "CEAA",
+               .build_code     = "BA",
+               .flash_size_kb  = 256,
+       },
+       {
+               .hwid           = 0x002F,
+               .variant        = "CEAA",
+               .build_code     = "B0",
+               .flash_size_kb  = 256,
+       },
+
+       /* nRF51822 Devices (IC rev 2). */
        {
                .hwid           = 0x002A,
                .variant        = "QFAA",
-               .build_code     = "FA",
+               .build_code     = "FA0",
                .flash_size_kb  = 256,
        },
        {
                .hwid           = 0x0044,
                .variant        = "QFAA",
-               .build_code     = "GC",
+               .build_code     = "GC0",
                .flash_size_kb  = 256,
        },
        {
@@ -153,57 +192,168 @@ static const struct nrf51_device_spec nrf51_known_devices_table[] = {
                .build_code     = "G0",
                .flash_size_kb  = 256,
        },
-
-       {
-               .hwid           = 0x0020,
-               .variant        = "CEAA",
-               .build_code     = "BA",
-               .flash_size_kb  = 256,
-       },
        {
-               .hwid           = 0x002F,
-               .variant        = "CEAA",
+               .hwid           = 0x004C,
+               .variant        = "QFAB",
                .build_code     = "B0",
-               .flash_size_kb  = 256,
+               .flash_size_kb  = 128,
        },
        {
                .hwid           = 0x0040,
                .variant        = "CEAA",
-               .build_code     = "CA",
+               .build_code     = "CA0",
                .flash_size_kb  = 256,
        },
        {
                .hwid           = 0x0047,
                .variant        = "CEAA",
-               .build_code     = "DA",
+               .build_code     = "DA0",
                .flash_size_kb  = 256,
        },
        {
                .hwid           = 0x004D,
                .variant        = "CEAA",
-               .build_code     = "D0",
+               .build_code     = "D00",
                .flash_size_kb  = 256,
        },
 
+       /* nRF51822 Devices (IC rev 3). */
        {
-               .hwid           = 0x0026,
+               .hwid           = 0x0072,
+               .variant        = "QFAA",
+               .build_code     = "H0",
+               .flash_size_kb  = 256,
+       },
+       {
+               .hwid           = 0x007B,
                .variant        = "QFAB",
-               .build_code     = "AA",
+               .build_code     = "C0",
                .flash_size_kb  = 128,
        },
        {
-               .hwid           = 0x0027,
-               .variant        = "QFAB",
+               .hwid           = 0x0083,
+               .variant        = "QFAC",
+               .build_code     = "A0",
+               .flash_size_kb  = 256,
+       },
+       {
+               .hwid           = 0x007D,
+               .variant        = "CDAB",
                .build_code     = "A0",
                .flash_size_kb  = 128,
        },
        {
-               .hwid           = 0x004C,
+               .hwid           = 0x0079,
+               .variant        = "CEAA",
+               .build_code     = "E0",
+               .flash_size_kb  = 256,
+       },
+       {
+               .hwid           = 0x0087,
+               .variant        = "CFAC",
+               .build_code     = "A0",
+               .flash_size_kb  = 256,
+       },
+
+       /* nRF51422 Devices (IC rev 1). */
+       {
+               .hwid           = 0x001E,
+               .variant        = "QFAA",
+               .build_code     = "CA",
+               .flash_size_kb  = 256,
+       },
+       {
+               .hwid           = 0x0024,
+               .variant        = "QFAA",
+               .build_code     = "C0",
+               .flash_size_kb  = 256,
+       },
+       {
+               .hwid           = 0x0031,
+               .variant        = "CEAA",
+               .build_code     = "A0A",
+               .flash_size_kb  = 256,
+       },
+
+       /* nRF51422 Devices (IC rev 2). */
+       {
+               .hwid           = 0x002D,
+               .variant        = "QFAA",
+               .build_code     = "DAA",
+               .flash_size_kb  = 256,
+       },
+       {
+               .hwid           = 0x002E,
+               .variant        = "QFAA",
+               .build_code     = "E0",
+               .flash_size_kb  = 256,
+       },
+       {
+               .hwid           = 0x0061,
+               .variant        = "QFAB",
+               .build_code     = "A00",
+               .flash_size_kb  = 128,
+       },
+       {
+               .hwid           = 0x0050,
+               .variant        = "CEAA",
+               .build_code     = "B0",
+               .flash_size_kb  = 256,
+       },
+
+       /* nRF51422 Devices (IC rev 3). */
+       {
+               .hwid           = 0x0073,
+               .variant        = "QFAA",
+               .build_code     = "F0",
+               .flash_size_kb  = 256,
+       },
+       {
+               .hwid           = 0x007C,
                .variant        = "QFAB",
                .build_code     = "B0",
                .flash_size_kb  = 128,
        },
+       {
+               .hwid           = 0x0085,
+               .variant        = "QFAC",
+               .build_code     = "A0",
+               .flash_size_kb  = 256,
+       },
+       {
+               .hwid           = 0x0086,
+               .variant        = "QFAC",
+               .build_code     = "A1",
+               .flash_size_kb  = 256,
+       },
+       {
+               .hwid           = 0x007E,
+               .variant        = "CDAB",
+               .build_code     = "A0",
+               .flash_size_kb  = 128,
+       },
+       {
+               .hwid           = 0x007A,
+               .variant        = "CEAA",
+               .build_code     = "C0",
+               .flash_size_kb  = 256,
+       },
+       {
+               .hwid           = 0x0088,
+               .variant        = "CFAC",
+               .build_code     = "A0",
+               .flash_size_kb  = 256,
+       },
 
+       /* Some early nRF51-DK (PCA10028) & nRF51-Dongle (PCA10031) boards
+          with built-in jlink seem to use engineering samples not listed
+          in the nRF51 Series Compatibility Matrix V1.0. */
+       {
+               .hwid           = 0x0071,
+               .variant        = "QFAC",
+               .build_code     = "AB",
+               .flash_size_kb  = 256,
+       },
 };
 
 static int nrf51_bank_is_probed(struct flash_bank *bank)
@@ -577,7 +727,7 @@ static int nrf51_erase_page(struct flash_bank *bank,
 
        LOG_DEBUG("Erasing page at 0x%"PRIx32, sector->offset);
        if (sector->is_protected) {
-               LOG_ERROR("Cannot erase protected sector at 0x%x", sector->offset);
+               LOG_ERROR("Cannot erase protected sector at 0x%" PRIx32, sector->offset);
                return ERROR_FAIL;
        }
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)