Flash Signature Generation for LPC5410x

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flash Signature Generation for LPC5410x

463 Views
BTaylor
Contributor III

Have any of you been able to successfully generate a signature for the flash on LPC5410x using the flash signature generator?

Using the following code snippet...

 

 

typedef struct {                                 
    __I  uint32_t RESERVED1[8];
    __IO uint32_t FMSSTART;                   
    __IO uint32_t FMSSTOP;                    
    __I  uint32_t RESERVED2[1];
    __I  uint32_t FMSW0;                       
    __I  uint32_t FMSW1;                       
    __I  uint32_t FMSW2;                       
    __I  uint32_t FMSW3;                       
    __I  uint32_t RESERVED3[1001];
    __I  uint32_t FMSTAT;                      
    __I  uint32_t RESERVED4[1];
    __IO uint32_t FMSTATCLR;                  
} LPC_FMC_Type;

#define LPC_FMC ((LPC_FMC_Type *) LPC_FMC_BASE)

...
    uint32_t signature[4];              // 128-bit signature

    LPC_FMC->FMSTATCLR = (1 << 2);      // SIG_DONE_CLR

    LPC_FMC->FMSSTART = (0x00000000 >> 4) & 0x0001FFFF;
    LPC_FMC->FMSSTOP  = (0x00067FFF >> 4) & 0x0001FFFF;

    LPC_FMC->FMSSTOP |= (1 << 17);      // SIG_START

    while ( ! (LPC_FMC->FMSTATCLR & (1 << 2) ) );

    LPC_FMC->FMSTATCLR = (1 << 2);

    signature[0] = LPC_FMC->FMSW0;
    signature[1] = LPC_FMC->FMSW1;
    signature[2] = LPC_FMC->FMSW2;
    signature[3] = LPC_FMC->FMSW3;
...

 

 I always end up with a value of 131077 for each of the signature values.
0 Kudos
0 Replies