K60 rev 1.x rev2.x unique firmware

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

K60 rev 1.x rev2.x unique firmware

1,092 Views
nickbridge
Contributor I

Dear all,

using K60 microcontrollers, can I distinguish from firmware which silicon version I'm using?

Is there a register that reading it tells me which silicon version has that microcontroller?

If it's possible I would write only one firmware that loads different registers when I'm using rev1.x silicon and when I'm using rev2.x silicon.

Thanks in advance,

Nicola

Labels (1)
0 Kudos
2 Replies

648 Views
nickbridge
Contributor I

Thank you very much for the answer!

Nicola

0 Kudos

649 Views
egoodii
Senior Contributor III

Certainly!  For instance:

if( (SIM_SDID & SIM_SDID_REVID_MASK) == 0) //For Rev 1.0 silicon, must disable all Flash caching & Speculation
{
    FMC_PFB0CR&= ~0x1FUL;    //Clear these bits for errata e2647 & e2644
    FMC_PFB1CR&= ~0x1FUL;
}

Or, more generally:

switch((SIM_SDID & SIM_SDID_REVID(0xF))>>SIM_SDID_REVID_SHIFT)

    {

    case 0x0:

            printf("Silicon rev 1.0\n");

            break;

    case 0x1:

            printf("Silicon rev 1.1\n");

            break;

    case 0x2:

            printf("Silicon rev 1.2\n");

            break;

    case 0x3:

            printf("Silicon rev 1.4\n");

            break;

    case 0x7:

            printf("Silicon rev 1.8\n");

            break;

    case 0xA:

            printf("Silicon rev 2.2\n");

            break;

    case 0xC:

            printf("Silicon rev 2.4\n");

            break;

0 Kudos