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

Identifier in the InfoPage??

Hi

In nRFgo Studio there is an option to read the entire memory of a chip. In my case nRF24Le1 to a .mhex file.

The first lines of the .mhex file says: Infopage: Identifier (0x00-0x0F): 0x5A 0x5A 0x43 0x30 0x52 0x30 0x34 0x38 0x06 0x08 0x1E 0x65 0x0D 0x43 0x11 0x72

Is this identifier unique for every chip? Or is it a 1 in a million chance of having two identical?

I want to read the Identifier, from the MCU. I guess that is possible?

  • @Gustav: The Identifier is generated randomly when in production, not a unique number for each chip. So there is a chance that we have 2 devices with same identifier, but it's small, should be one in 2^40. The chip ID is from address 0x0B to 0x0F.

    Yes you can read the identifier from MCU.

    ReadInfoPage.zip

  • With nRFgo I have read 7 different nRF24le1 chips. I can see that the first few bytes of the infoPage are fixed and depend on the chip type. The last 7 bytes of the infoPage seems to be the only ones that are random. But this is still 2^(7*8) combinations. That is good enough for the product I am working on.

    I have tried to read the infoPage using the MCU, but without any luck.

    __xdata uint8_t p[32]
    PCON |= PMW;
    
    flash_bytes_read(0x0000, p, 32);
    PCON &= ~PMW; 
    

    The array, p, is filled with bytes that does not look like the infoPage. The result is different, but still not good, if the PCON statements are removed (which they probably should).

    Can you drop a few lines about how to read the infoPage from MCU.

  • Hi Gustav,

    Sorry for the mistake. I just checked again, actually only 5 bytes from 0x0b to 0x0f should be used as CHIP_ID. I attached in my answer the example project to read the Infopage. Note that you have to set Memory Model to Small.

  • Dear Hung Bui,

    Great work! Thanks a lot. I had to change it a bit to adapt to SDCC. The data has to be put into the destination array while INFEN == 0. I have always used Small Memory Model, but SDCC compiles the same .hex file, no matter if the model is small or not.

    enter code here
    

    void flash_read_chipID (uint8_t *dst, uint8_t n) { uint8_t i, j; volatile uint8_t __xdata *gzp = (uint8_t __xdata *)0x0b;// 0x0b is start of chip ID in info-page

    F0= INFEN;
    
    INFEN = 1;
    
    for (i=0; i<n; i++) {
        j = *(gzp + i);
        INFEN = 0;
        dst[i] = j;// dst[i] has to executed while INFEN == 0
        INFEN = 1;
    }
    INFEN = F0;
    

    }

  • @Gustav: I haven't tested on SDCC, on Keil I have to set the Memory to Small, so that the variable will not be located in xdata, because the infopage will occupy the xdata address area when enabled.

    Did it work for you in SDCC ?

Related