This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Bug in GetDevName() in am335x_indcomm_utils.c in AM335x Industrial SDK

Other Parts Discussed in Thread: AM3354, AM3352, AM3359, AM3356, AM3357, AM3358

I found a bug in GetDevName() in am335x_indcomm_utils.c in the "platform" folder of the AM335x Industrial SDK. I found it in SDK 1.0.0.7, but I believe it exists in previous releases of the SDK as well.

GetDevName() is used to figure out the name of the processor/device (AM3352, AM3354, ..., AM3359, etc.).

The issue is that the values used to identify the device are wrong. I checked Table 1-4 DEV_FEATURE (Address 0x44E10604) on pg. 157 of the AM335x Technical Reference Manual (Rev F) and found the following values:

Here is GetDevName() in its present form:

char * GetDevName()
{
    //Return Device name - in String format
    unsigned int temp = *((unsigned int*) 0x44E10604);
   
    switch(temp)
    {
        case 0x00FF0382:
            return dev_names[0];
        case 0x20FF0382:
            return dev_names[1];
        case 0x00FF0383:
            return dev_names[2];
        case 0x00FE0383:
            return dev_names[3];
        case 0x20FF0383:
            return dev_names[4];
        case 0x20FE0383:
            return dev_names[5];
        default :
            return dev_names[6];
    }
}

 

Here is how I believe GetDevName() should be corrected:

char * GetDevName()
{
    //Return Device name - in String format
    unsigned int temp = *((unsigned int*) 0x44E10604);
    
    switch(temp)
    {
        case 0x00FC0382: 
            return dev_names[0]; //AM3352
        case 0x20FC0382: 
            return dev_names[1]; //AM3354
        case 0x00FD0383: 
            return dev_names[2]; //AM3356
        case 0x00FF0383: 
            return dev_names[3]; //AM3357
        case 0x20FD0383: 
            return dev_names[4]; //AM3358
        case 0x20FF0383: 
            return dev_names[5]; //AM3359
        default :
            return dev_names[6]; //Unknown
    }
}

 For reference, here is the contents of dev_names[]:

char* dev_names[] =
{
    "AM3352",
    "AM3354",
    "AM3356",
    "AM3357",
    "AM3358",
    "AM3359",
    "Unknown"
};

 When I used GetDevName(), I noticed that the AM3359 processor that I am using was detected as an AM3358 processor, which led me to the bug. I thought I should bring it to TI's attention so that it can be corrected in the next SDK release.

Regards