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.

CCS/TMS320F28054F: How to secure this device with the original OTP contents all 0s

Part Number: TMS320F28054F
Other Parts Discussed in Thread: MOTORWARE

Tool/software: Code Composer Studio

Hi, 

       I'm trying to secure the TMS320F28054F. Here are my issues:

       1. When I connect the CCS with my device(with no program in), I check the memory browser to see the Z1 OTP zone,0x3D7A00~0X3D7BFF, which is full of 0s.

           while for Z2, 0x3D7800~0X3D79FF, which is all 0xFFFF.

           Is Zone 1 normal? I bought the IC from MOUSER.

        2. I can program with CCS without the F2805x_DCSM_Z1_ZoneSelectBlock._asm(with all 0xFFFFFFFF)

            But when I include this file to the project. I cannot program with CCS anymore.

        3. If I don't include this ASM file, I connect to CCS and program my project.  The  DCSM register contents is in the attachment.

            Flash,L1,L2,L3 belong to Z1, L0 belongs to Z2. However L0 is not used. Why the resources are allocated like this?

        4.  I just want wo secure Z1. I tried to secure Z2, everything is OK,but if I allocate resources to Z2, I cannot run the instaspin program in Z2(I'm not sure why).

Best Regards

Arrow

Below is the ASM file and the picture of  DCSM register.

     
.sect "dcsm_otp_z1" .long 0xFFFFFFFF ;Z1-LINKPOINTER .long 0xFFFFFFFF ;OTPSECLOCK .long 0xFFFFFFFF ;Boot Mode .sect "dcsm_zsel_z1" .long 0xFFFFFFFF ;Z1-EXEONLYRAM // excute-only protection for flash .long 0xFFFFFFFF ;Z1-EXEONLYSECT // only can be read .long 0xFFFFFFFF ;Z1-GRABRAM // set ram protection .long 0xFFFFFFFF ;Z1-GRABSECT // set the protected ares of flash belongs .long 0xFFFFFFFF ;Z1-CSMPSWD0 (LSW of 128-bit password) .long 0xFFFFFFFF ;Z1-CSMPSWD1 .long 0xFFFFFFFF ;Z1-CSMPSWD2 .long 0xFFFFFFFF ;Z1-CSMPSWD3 (MSW of 128-bit password)

  • Hi,

    It look like the password values have been programmed for Z1 hence Z1 is secure. That is why you are seeing values in Z1 OTP as 0x0. On the new (un-programmed) device you'll see these values as ALL_1 (just like Z2). To reprogram these values you need to unlock Z1 by using the password which are programmed. I assume you do not know the password values but if you have the .out/map file which you have tried earlier,  please check if there is anything mapped at Z1 password locations. If yes then you have to concert the .out to hex file ( check this thread - and try to extract the password value which was  programmed. One you know the password, use this to unlock Z1 and program new linkpointer value and other security settings at new Zone_Select_Block location (as per new linkpointer).

    If you can not find the password values then you need to replace the part.

    Hope this helps.

    Regards,


    Vivek Singh

  • Hi, Vivek

    1. I'm pretty sure I didn't program the DSP,since I get a totally new PCB board. The situation is the same.

    2. I just connect the new board with CCS6.0. The console window shows Zone 1 is secure. It's difficult to me to understand.

        I check the Register window, the ZR of Z1 is 0x0040,which means when I connect the device ,the CCS read the password according the 28054F.gel.

        And the ZR register just shows the device has the password when this device comes out of manufacture,which is not all 1s, and no 0s too.

    3. I use the on-chip flash to unlock the device.

      for Z2,  with password all 1s, the result is the device is unlocked.

      for Z1,   with password all 1s, the result is that error ocurred when unlock this zone. 

    3. Do you have a spare 28054F device in your hand? Would you please do a test for me ?Just connect the device to see if the CCS console window shows the Zone1 in secure state.

    Best regards

    Arrow

    Picture below is the process of connecting and unlocking device.

  • Hi,

    3. Do you have a spare 28054F device in your hand? Would you please do a test for me ?Just connect the device to see if the CCS console window shows the Zone1 in secure state.

    We have tested these devices in past and never saw this issue. Also no other customer has reported this issue. If you have more devices/boards, please check them as well. If you see this issue on multiple devices then send us the screen shot of this device (top view).

    Regards,

    Vivek Singh

  • Hi, Vivek

    1. I have tested tens of boards. They all totally the same.

        Due to the time difference, I'm off duty now. I will send you the making code  screen shot of these device to you tomorrow morning.

    2. I have discussed with the AE of TI In ShangHai office. They now have the 28054M controlcard which they found is nomal. Howerver they don't have the

        28054F chip around.

    3. I also have a 28035 controlcard in my hand. I checked this device.  I can read the 0x003F7FF8~0x003F7FFF,which is all 1s.

        I just want to show that I did test the device in the right way.

    best regards

    Arrow

  • Hi, Vivek

    below is the screenshop to the device (top view)

    best regards

    Arrow

  • Hi,

    Thanks. Are these device programmed with some data in flash (factory programmed) before you get to access or nothing is suppose to be programmed into flash.

    Regards,

    Vivek Singh
  • Hi,

    I think nothings is supose to be programmed into flash.Because  I checked the FLASH A to FLASH J and all are 1s.

    Recently I applied 10 pieces of 28054M for TI.

    I replaced the 28054F with 28054M. However the situation is the same. I cannot read the Zone1 OTP region which is all 0s to me .

    What I do is just to use the 28054M.gel File  to connect the CCS  with the  board.

    By the way , I used the program from motorware for 2805x.

    In the  hal.c  source file,  some lins  are strange:

    HAL_Handle HAL_init(void *pMemory,const size_t numBytes)
    {
      uint_least8_t cnt;
      HAL_Handle handle;
      HAL_Obj *obj;
    
      volatile int tmp;
    
      ENABLE_PROTECTED_REGISTER_WRITE_MODE;
    
      tmp = *(int *)0x003D7A18;
      tmp = *(int *)0x003D7A19;
      tmp = *(int *)0x003D7A1a;
      tmp = *(int *)0x003D7A1b;
      *(int *)0xB90 = 0xCEEC;
      *(int *)0xB91 = 0x4CA7;
      *(int *)0xB92 = 0xAAEB;
      *(int *)0xB93 = 0x7030;
    
      DISABLE_PROTECTED_REGISTER_WRITE_MODE;
    
    

    If the chip is unsecure(factory made), why I need this section program?

    Best Regards

    Arrow

  • Ok, look like these are some specific parts which you ordered. I am checking on this further and will revert back to you soon.

    Vivek Singh
  • Hi, Vivek

    I'd like to know if there is any progress now.


    Thanks a lot
    Arrow
  • Hi, Vivek

    I find someone had the similiar problem as I do. But there's no result for that thread.
    This is his thread path:
    e2e.ti.com/.../460922
    the tile is 'How to get the update value of memory map register of Z1_LINKPOINTER(0xB80) in DCSM module on TMS320F2805x device'

    best regards
    Arrow
  • Hi,

    As expected, these were specific parts where passwords location of Zone1 are programmed by TI hence user can not use this zone for their usage. Also on these parts RAML0 is secure and reserved for TI usage so user will not be able to use this RAM as well. User should still be able to use the Zone2 for their own security usecase.

    Hope this clarifies the issue.

    Sorry that this took some time at our end because we did not have this specific part to test.

    Regards,

    Vivek Singh

  • Hi,
    Yes, this clarifies me that why I cannot secure Zone1.

    Here's two more questions:
    1. Does all 28054F/28054M has this issue, or just some in the past? Because what I used were manufactured in 2015 and my FAE in Shanghai offcie, said their 28054M has no issue about this.

    2. As I told above, yes, I can use Zon2 for my security case. However, If I allocate all Flashs into Zone2(not exeonly,just belongs to it), The CAN bus communication is OK, but the motor doesn't run.
    This maybe comes out due to the Instaspin ROM which is secured by Zone1.

    So, in this case, how can I secure my program and ensure the motor's normal working?
    Does this question belong to your forum case or should I post a new thread in Instaspin Forum?

    Best Regards

    Arrow
  • Hi,

    This is not an issue. These are specific parts where Zone1 is secured for TI use. This is not fully described and we are going to update it.

    FAE may have pre-TMS sample.

    Function calls between Zone1 and Zone2 are allowed so you should be able to use Zone2 security. Just make sure there is no data transfer between these two zones because that will not work.

    Regards,

    Vivek Singh
  • OK, I'll do some test to see if there is any conflict.

    Regards
    Arrow
  • Hi,Vivek

    I find out that there is data transfer between Zone1 and Zone2.
    Now I fix this problem.
    Thanks, and your advice is really helpful.

    Arrow