This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to identifier nRF51 SoC chip?

I try use the FICR information to identifier nRF51. but found some interesting staff when i read 0x10000000 first 16 bytes by SWD memory read. when I power on read. it return all 0x00. but i restart SWD debuger read again. it will return 0xAA 0x55 0xAA 0x55 0xAA 0x55 0xAA 0x55 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF

and CONFIGID also same.

do FICR be RTL? why could be changed, ? is there has fixed area can be used as identifier?

Parents
  • Not sure why you were reading 0x00's but the FICR is permanent device and calibration data tuned for each chip, it will/should not change.

  • I using SWD to read FICR. first use these code setup and enter SWD debug mode.

        swd_init();
    
        //add Reset Pin
        swd_set_target_reset(1);
        os_dly_wait(1);
        swd_set_target_reset(0);
        //need wait 500us
        for( i = 0; i < 1200; i++) {}
    
       //init SWD sequence and get IDcode
        if (!swd_reset()) {
            return Target_UNKNOWN;
        }
        if (!swd_switch(0xE79E)) {
            return Target_UNKNOWN;
        }
        if (!swd_reset()) {
            return Target_UNKNOWN;
        }
        if (!swd_read_idcode(&tmpid)) {
            return Target_UNKNOWN;
        }
    
        if (!swd_write_dp(DP_ABORT, STKCMPCLR | STKERRCLR | WDERRCLR | ORUNERRCLR)) {
            return Target_UNKNOWN;
        }
    
        // Ensure CTRL/STAT register selected in DPBANKSEL
        if (!swd_write_dp(DP_SELECT, 0)) {
            return Target_UNKNOWN;
        }
    
        // Power up
        if (!swd_write_dp(DP_CTRL_STAT, CSYSPWRUPREQ | CDBGPWRUPREQ)) {
            return Target_UNKNOWN;
        }
    
        do {
            if (!swd_read_dp(DP_CTRL_STAT, &tmp)) {
                return Target_UNKNOWN;
            }
        } while ((tmp & (CDBGPWRUPACK | CSYSPWRUPACK)) != (CDBGPWRUPACK | CSYSPWRUPACK));
    

    then read FICR use swd_read_memory().

Reply
  • I using SWD to read FICR. first use these code setup and enter SWD debug mode.

        swd_init();
    
        //add Reset Pin
        swd_set_target_reset(1);
        os_dly_wait(1);
        swd_set_target_reset(0);
        //need wait 500us
        for( i = 0; i < 1200; i++) {}
    
       //init SWD sequence and get IDcode
        if (!swd_reset()) {
            return Target_UNKNOWN;
        }
        if (!swd_switch(0xE79E)) {
            return Target_UNKNOWN;
        }
        if (!swd_reset()) {
            return Target_UNKNOWN;
        }
        if (!swd_read_idcode(&tmpid)) {
            return Target_UNKNOWN;
        }
    
        if (!swd_write_dp(DP_ABORT, STKCMPCLR | STKERRCLR | WDERRCLR | ORUNERRCLR)) {
            return Target_UNKNOWN;
        }
    
        // Ensure CTRL/STAT register selected in DPBANKSEL
        if (!swd_write_dp(DP_SELECT, 0)) {
            return Target_UNKNOWN;
        }
    
        // Power up
        if (!swd_write_dp(DP_CTRL_STAT, CSYSPWRUPREQ | CDBGPWRUPREQ)) {
            return Target_UNKNOWN;
        }
    
        do {
            if (!swd_read_dp(DP_CTRL_STAT, &tmp)) {
                return Target_UNKNOWN;
            }
        } while ((tmp & (CDBGPWRUPACK | CSYSPWRUPACK)) != (CDBGPWRUPACK | CSYSPWRUPACK));
    

    then read FICR use swd_read_memory().

Children
No Data
Related