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.

AM5K2E02: Determine the device speed (15 vs 4) in the booting phase. Is there an ID register?

Part Number: AM5K2E02
Other Parts Discussed in Thread: 66AK2E05

Hi all,

We are looking at 'SPRS864D', the datasheet for AM5K2E02, and in particular section 3.3.2 "Part number legend". The bottom field of this name is 25 or 4, 25 for 1.25GHz and 4 for 1.4GHz.

Is there a register to read that will determine this at runtime in the boot phase? I tried the JTAGID register (at 0x02620018) but this is the same for both SoCs.

Use case: need to have a boot image on both processors which can decide which settings to use for PLL depending on the core running speed.

There is also a ‘DEVSPEED’ register that in the datasheet looks perfect. But both the SoCs are reading it as 0x0 (both in C code and in the debugger directly), so that is not helpful.

Many thanks

  • Gregory Fenn,

    JTAGID and the DEVSPEED are the only two options to differentiate. No other options available.

    Usually, DEVSPEED register will give the max speed of the device.

    In AM5K2E02, the DEVSPEED register has the field, "ARMSPEED"  --- bits 0-11 should give the max core frequency value.

    Just run the gel file in ccs and use the memory browser window and type the address of DEVSPEED register and try to visualize the value .

    Regards

    Shankari G

  • As I say, the DEVSPEED (i.e. *(unsigned int*)(0x02620C98U)) is 0 for both processors so that's not a lot of help, my issue seems to be similar to "DEVSPEED on the EVMK2H board default to 0? - Processors forum - Processors - TI E2E support forums" - although no one fixed that issue either.

    Using CCS is not possible because we need to dynamically read DEVSPEED at runtime in development. The problem isn't us figuring out the speed of each SoC offline, it's figuring it out during booting.

    It's also worth noting that the ARMSPEED field you mentioned can't be right, as none of the options in the datasheet at 1250 MHz, so none of the speeds would read correctly for our 1.25GHz board.

  • As I say, the DEVSPEED (i.e. *(unsigned int*)(0x02620C98U)) is 0 for both processors so that's not a lot of help, my issue seems to be similar to "DEVSPEED on the EVMK2H board default to 0? - Processors forum - Processors - TI E2E support forums" - although no one fixed that issue either.

    DEVSPEED will definetly work on K2H boards. I have experimented multiple times.....( See the snapshot, below )

    The correct address is 0x02620C90 for  (silicon revisions 2.0, 3.0, and 3.1Please note,  acording to the silicon version, the address of DEVSPEED will get changed. Refer to the memory map section. Page no:  211 https://www.ti.com/lit/ds/symlink/66ak2h12.pdf

    Using CCS is not possible because we need to dynamically read DEVSPEED at runtime in development. The problem isn't us figuring out the speed of each SoC offline, it's figuring it out during booting.

    I completely understand your need. For testing pupose just confirm whether that is doable and able to confirm the value with the DEV speed and differentiate. 

    And once that is through, it is easy to insert in the boot code to read the value of DEVSPEED. Right??

     ---

    Now,  I  have experimented the DEVSPEED value with K2H board and able to map the value as "1400 MHz --> 1.4 GHz." ( See the snapshot )

     I can be pretty sure that the DEVSPEED will return appropriate value as below  and never gives "0".

    K2H data sheet plus calculator with the value reecived in the DEVSPEED register.

    I do not have AM5K2E02 board in hand. Otherwise, it would have been lot more easier.  But the procedure remains same.

    Regards

    Shankari G

  • Thanks Shankari, however this information and your datasheet SPRS866G is for the K2H boards, our device is a K2E board, not K2H. Do you know where I can canonically find the register address of DEVSPEED for AM5K2E02? 

    According to the latest datasheet/errata here (AM5K2E02 data sheet, product information and support | TI.com), the DEVSPEED register for K2E is 0x02620C98. Is there any way I can prove to our testing/auditing teams that the K2E register is in fact at 0x02620C90 instead? Our product would not likely pass quality assurance auditing if my best explanation of why I am reading 0x02620C90 (instead of 0x02620C98) is that we think the datasheet is wrong.

  • Gregory,

    No...No That is not my point.....

    ---

    It is because you pointed K2H E2E thread, I proved that K2H is giving correct value on DEVSPEED register. That's it.

    And additionally reminded you about the silicon revisions w.r.t to the address of DEVSPEED......

    I have K2E board too - i.e.,  66AK2E05 ( but not AM5K2E02 board ) , but still it is "EDISSON" boardwith both C66x and ARM core. 

    ( E - stands for Edisson in K2E)  

    If 66AK2E05 can fetch a correct value on DEVSPEED, definitely,  AM5K2E02 should also likely to fetch the correct value.

    --

     I have experimented with 66AK2E05, even it fetches the values at 0x02620C90 and not 0x02620C98 . see the image below

    And I understand, in the K2E datasheet, 0x02620C90 address is reserved.

    "0x02620C98" is the address mentioned for DEVSPEED register.... ( I am surprised too )

    --

    --

    However, let me discuss with the internal team and get back, enquiring about the correct address of DEVSPEED register for 66AK2E and AM5K2E02 devices...

    Regards

    Shankari G

  • Gregory,

    In one of the old E2E post, Mukul stated that 

    "I looked through the design specs for K2E and found that that the DEVSPEED field for K2E is on 0x02620C90 The datasheet is incorrect in showing that as 0x02620C98."

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1024108/66ak2h14-the-max-frequency-on-66ak2h14-and-66ak2e05/3793315#3793315

    As, there is no plan to update the datasheet, Let me capture this error in the form of FAQ.

    Regards

    Shankari G

  • Thanks, when I read from 0x02620C90 and ignore the incorrect misleading datasheet I get the following readings:

                      @0x0262_0C90
        ==========================
        1.25GHz SoC:  =0x0004_0004
        1.40GHz SoC:  =0x0010_0010

    But I am confused what these values mean as they don't seem to make any sense when compared to the datasheet SPRS864D.

    These values means that (according to the DEVSPEED) manual [SPRS864D, 8.2.3.16]:

    -- For the 1.25GHz chip the DEVSPEED and ARMSPEED fields read at 1350Mhz (there is in fact no option for 1250MHz in section 8.2.3.16 even though I would expect to read that)

    -- For the 1.4GHz chip, DEVSPEED and ARMSPEED fields read at 1500MHz (which again doesn't make sense because the Table 3-1 of SPRS864D, row "Frequency" clearly says the chip is 1.25Ghz or 1.4GHz)

    Looking at the discussion you linked me to here: 66AK2H14: The max frequency on 66AK2H14 and 66AK2E05 - Processors forum - Processors - TI E2E support forums  : it looks like the readings above (0x00040004 and 0x00100010) are correct but that the datasheet is wrong yet again. 

    Is there an official source we can reference to confirm the correct location and meaning of DEVSPEED?, as we will need to audit and verify the code produced for our product and as part of that, we will need to justify the use of the following code snippet macro example:


        #define ReadDeviceSpeedInMHz   ( ( *(volatile uint32*)0x02620C90U == 0x00040004U ) ?  1250 : 1400 )

    Thanks for your help so far.

  • Gregory,

    Yes, the datasheet values are wrong in two places , Which was already admitted in the above e2e link -- Please see Mukuls reply about the speed grades.

    Your readings seems to be right and matches with the table given below.

    #define ReadDeviceSpeedInMHz   ( ( *(volatile uint32*)0x02620C90U == 0x00040004U ) ?  1250 : 1400 )

    Yes, it is 1250MHz, if the value is 0x00040004.

    It is 1400 MHz if the value is 0x00100010.

    --

    @0x0262_0C90
        ==========================
        1.25GHz SoC:  =0x0004_0004
        1.40GHz SoC:  =0x0010_0010

    --

    Mukul's reply from the above e2e:-

    The speed grades offered are the ones listed in section 3.4.2 of the datasheet -part number legend. 1.25GHz ARM/DSP or 1.4 GHz ARM/DSP 
    ( page no: 11 in the datasheet )

    The fields are 

    DEVSPEED

    ARMSPEED

    XYZ25

    0x004

    0x004

    XYZ4

    0x010

    0x010

    --

    Alternately, 

    Is it possible to check and see the markings on the chip? so that we can map it to the device name nomenclature?

    --

    Meanwhile,  I have initiated an email discussion to the internal hardware team to confirm these corrections.

     ---

    And also I agree, the following

    -- For the 1.25GHz chip the DEVSPEED and ARMSPEED fields read at 1350Mhz (there is in fact no option for 1250MHz in section 8.2.3.16 even though I would expect to read that)

    The value 0x00040004 maps to 1350MHz according to the section 8.2.3.16..., which is supposed to be 1250 MHz.

    -- For the 1.4GHz chip, DEVSPEED and ARMSPEED fields read at 1500MHz (which again doesn't make sense because the Table 3-1 of SPRS864D, row "Frequency" clearly says the chip is 1.25Ghz or 1.4GHz)

    The value 0x00100010 maps to 1500MHz according to the section 8.2.3.16..., which is supposed to be 1400 MHz.

    Regards

    Shankari G

  • Gregory,

    Reply from the internal team:-

    @0x0262_0C90
        ==========================
        1.25GHz SoC:  =0x0004_0004
        1.40GHz SoC:  =0x0010_0010

     

    As per table 9-46 in datasheet, the values 0x00040004 maps to 1350 MHz and 0x00100010 to 1500 MHz are max-core-frequencies; The recommended operating frequencies are 1250 MHz and 1400 MHz respectively, as per page no:8. 

    --

    Did you check and see the markings on the chip? so that we can map it to the device name nomenclature?

    Regards

    Shankari G