What is "Version ID" expected to return during a Read Resource Flash command?

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

What is "Version ID" expected to return during a Read Resource Flash command?

1,230 Views
bobpaddock
Senior Contributor III

KL25 Sub-Family Reference Manual, in chapter 27, has the Flash Read Resource to read a Version ID.

There is no explanation of what this Version ID means.

When I read the eight bytes I always read eight zeros.

Is this a valid ID?

Labels (1)
5 Replies

873 Views
kerryzhou
NXP TechSupport
NXP TechSupport


Hi Bob Paddock,

     Every chip has a version ID, and not all zero, so I think maybe your read method has some problem.

    You can try to read again according to the following code,

INT8U FTFA_RDRSRC(INT32U addr, INT8U resource_select_code, INT32U *data)
{
    INT8U cmd_ary[12];
    INT32U ret_val;
    INT32U data0;
    
    /*
     *  initialize return variables.
     */
    *data = 0;
         
    /*
     *  Don't forget to do this ->
     */
    addr = ftfa_convert_addr_to_ccob_addr(addr);
    /*
     *  if youare using a pflash/FLEXNVM part.
     */
    
    cmd_ary[0] = FTFA_RDRSRC_CMD;
    cmd_ary[1] = bits_23_16(addr);
    cmd_ary[2] = bits_15_8(addr);
    cmd_ary[3] = bits_7_0(addr);

    cmd_ary[8] = resource_select_code;
    
    ret_val = ftfa_run_ccob_cmd(cmd_ary, 9);       

    if (ret_val == 0)
    {
        /*
         *  Read the data out of the CCOB's
         */
        data0 = (FTFA_FCCOB4 << 24) + (FTFA_FCCOB5 << 16) + (FTFA_FCCOB6 << 8) + FTFA_FCCOB7;

        *data = data0;
    }
       
    /*
     *  returns 0 for pass or fstat error bits for fail.
     */
    return ret_val;
}

and read in main.c

       INT32U  ulDataStore[10] ;

    ucTemp = FTFA_RDRSRC(0x0,FTFA_VERSION_ID_RSRC,ulDataStore);

    ucTemp = FTFA_RDRSRC(0x4,FTFA_VERSION_ID_RSRC,&ulDataStore[1]);

    printf("Read Vesion ID : %#8x %#8x\r\n",ulDataStore[0],ulDataStore[1]);

I use this code read out the right version ID, not all zero!

I hopes it helps you!

Best regards!

Jing

0 Kudos
Reply

873 Views
gorakk
Contributor IV

Jing,

Where can I find the ftfa_convert_addr_to_ccob_addr() and ftfa_run_ccob_cmd() functions? 

Regards,

Allen

0 Kudos
Reply

873 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Allen,

      Please refer to the attached FTFA driver code.

Wish it helps you!

Jing

0 Kudos
Reply

873 Views
egoodii
Senior Contributor III

In a related inquiry, I read all the ID-info from a K20 and it returns these pieces of information:

K20-100pin      Silicon rev 2.4

Flash parameter version 0.0.8.0

Flash version ID 5.2.3.0

512 kBytes of P-flash    128 kBytes of RAM

So on a related question, what does this Flash ID information TELL me that I might NEED to know?

0 Kudos
Reply

873 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Earl Goodrich II,

     Flash version ID is just the chip's ID, every chip has a Flash ID, and is not the same, it is write in the factory and read only to customer. It is used to distinguish the chip when you use a lot of the same type chip.It is like the person ID number. And it is the only difference between the same type chip.

I wish it helps you!

Best regards!

Jing

0 Kudos
Reply