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.

TMS320F280039C: Setting for DCSM in Sysconfig

Part Number: TMS320F280039C
Other Parts Discussed in Thread: SYSCONFIG

Hi Champ,

I am asking for my customer.

We have referred to the doc. SPRACP8A and SPRACS4, there are still some questions would like to know more before get started.

(1). If user only needs the JTAGLOCK function, is it a must need to check the Configure this Section of ZONE1 Per LINKPOINTER ? 

(2). Continue to 1st question, if we do not check the Configure this Section of ZONE1 Per LINKPOINTER, does that mean the password for JTAGLOCK, would always be the one set in JTAGPSWDH0 & JTAGPSWDH1, and no longer be modified, correct ?

(3). How do we know Current LINKPOINTER value is ? Is the 0x00003FFF a default value ?

(4). Why there is an error showing "This password value has a mask of 0x27ffffff. Input a password that when the mask is applied, it does not change." in JTAGPSWDL1 after checking the update the LINKPOINTER ? Would the expert kindly clarify what the error is, and how should it work properly ?

Thanks and regards,

Johnny

  • Hi Johnny,

    (1). If user only needs the JTAGLOCK function, is it a must need to check the Configure this Section of ZONE1 Per LINKPOINTER ? 

    Yes. That is correct. Only if the Configure this section button is ticked will it allow you to update the respective section.

    (2). Continue to 1st question, if we do not check the Configure this Section of ZONE1 Per LINKPOINTER, does that mean the password for JTAGLOCK, would always be the one set in JTAGPSWDH0 & JTAGPSWDH1, and no longer be modified, correct ?

    No. You can update that later as well. Our recommendation however is to program all the sections at once. The JTAGPSWDH0/1 are the upper 64 bits of the 128 bit JTAGPSWD which are updateable only once.

    (3). How do we know Current LINKPOINTER value is ? Is the 0x00003FFF a default value ?

    Yes. 0x00003FFF is the Initial value when the device is shipped from TI. You can either choose to stay with the current link pointer or move to the next link pointer by checking teh Update LINKPOINTER field.

    (4). Why there is an error showing "This password value has a mask of 0x27ffffff. Input a password that when the mask is applied, it does not change." in JTAGPSWDL1 after checking the update the LINKPOINTER ? Would the expert kindly clarify what the error is, and how should it work properly ?

    For each link pointer value, there is a 128 bit default password which is already programmed by TI. The list of these default password values based on the link pointer is mentioned in the device TRM inside the DCSM Chapter. The error you see is because when the link pointer is updated, the CSM password needs to be aligned with the default password based on the updated link pointer. Kindly update the CSMPSWD1 value with the given mask 0x27ffffff to resolve the error. You can then update the CSMPSWD1 based on your choice while honoring this mask value.   

    Hope this is clear.

    Thanks & Regards

    Pramod

  • Hi Pramod,

    Yes. That is correct. Only if the Configure this section button is ticked will it allow you to update the respective section.

    I am still confusing. Since the default DCSM setting in Sysconfig, it is checked in Configure this section button. Or I should ask in another way, what is the difference between check and uncheck " Configure this section " button circled in red if the user only needs the JTAGLOCK function ?

    I can't really tell LINKPOINTER is relevant and does need to be selected. So my question would be if I only need the JTAGLOCK function, do I need to tick the Configure this Section of ZONE1 Per LINKPOINTER ? Would you kindly clarify more on the difference and relevance ?

    Thanks and regards,

    Johnny

  • Hi Pramod,

    One more question about if user doesn't expect to enable JTATGLOCK through sysconfig in the beginning, and wish to enable JTATGLOCK in the main code / application code, could I just declare a function such as void set_JTATGLOCK(void), and copying the code gen. in dcsm.asm into the declared function ? 

    If it isn't doable in above way, how to implement such implementing requirement ? Should I implement with the relating registers for JTATGLOCK in bit field way ? 

    Thanks and regards,

    Johnny

  • Hi Johnny,

    Enabling JTAGLOCK is a two fold process where 2 settings will control the device JTAGLOCK. Let me explain.

    1. JLM_ENABLE: This is single bit configuration where if enabled, you will be able to connect to the device upon scanning the 128 bit JTAGKEY. This is by default disabled and can be enabled if the Enable JTAGLOCK button in Zone1 Header section is ticked.

    2. 128 Bit JTAGPSWD (JTAGPSWDH1/ JTAGPSWDH0 / JTAGPSWDL1/ JTAGPSWDL0): Out of this 128 bit JTAGPSWD, the upper 64 bit is placed in the Zone1 HEADER section (represented by JTAGPSWDH1/JTAGPSWDH0) which is updateable only once. the lower 64 bits of the JTAGPSWD (represented by JTAGPSWDL1/JTAGPSWDL0) is placed in Zone1 per LINKPOINTER section. This can be modified more thanm once by nature of moving to a different LINKPOINTER.

    If you want to just enable JTAGLOCK, just doing point 1) above will lock the JTAG. However since the 128 JTAGPSWD has not been modified and left to the default value, the JTAG can be unlocked by scanning in the default 128 bit JTAG password. But i believe this will not suffice for you and you will need a custom 128 bit JTAGPSWD which is known only to you so that only you can scan in the password to unlock the JTAG. To achieve this, you will have to program the 128 bit JTAGPSWD of your choice. Now, based on the value you wish to program, if you just want to modify the upper 64 bit of JTAGPSWD, then updating only Zone1 HEADER section will suffice and you dont need to check the "Configure this section" button of Zone1 LINKPOINTER. However, if you wish to update the lower 64 bit of the JTAGPSWD, then you'll have to check the "Configure this section button of Zone1 LINKPOINTER section.

    Hope this is clear.

    Thanks & Regards
    Pramod

  • Hi Johnny,

    It is fine to update the enable JTAGLOCK via the application. However, it depends on how you define this function you are mentioning. If you have a section as part of your executable (.out file) where this JLM_ENABLE is defined, then using the On chip Flash utilities on CCS, the respective OTP location where this register is defined is automatically programmed while loading the .out to the target on CCS. 

    Thanks & Regards

    Pramod

  • Hi Pramod,

    Noted it. Thanks for your clarification. 

    Few more following up questions : 

    (1). From my last question about enable JTATGLOCK and set the password in the main code, if user doesn't want to use the On chip Flash utilities on CCS to do that, and expects to write a function to enable JTATGLOCK and set the customized JTATGLOCK password, how to implement that ? Could I just copy the code generated in dcsm.asm (above snippet) into that function ? 

    (2). My customer is using driverlib and bit field in project at the same time. As Sysconfig GUI will automatically generate dcsm.cmd based on enable JTATGLOCK setting. There is an error showing the memory in dcsm.cmd overlaps existing memory declaration in f28003x_headers_noBIOS.cmd. 

    After comment out few lines in memory and sections in f28003x_headers_noBIOS.cmd. The error is address.

    I would like to confirm the lines didn't comment out (DCSMCOMMON, DCSMZ1, DCSMZ2, DcsmCommonRegsFile, DcsmZ1RegsFile, DcsmZ2RegsFile), should I keep it or not ? 

    Thanks and regards,

    Johnny

  • Hi Johnny,

    1) The JTAGLOCK password is a location in Flash OTP and has to be programmed. When you mean write a function - It means you need a function in order to program the password in the OTP which is in Flash and needs to be programmed.  If you don't wish to use the On Chip Flash utilities, and implement this via application code, then i believe you need to use the Flash API to achieve this. Just having the section which defines the data and the address location as part of the .asm and .cmd will not be sufficient. 

    2) Recommendation would not be to have both driverlib and bit field as part of the same project due to the issues you have mentioned and faced. There will be memory overlaps between the .cmd files of both the styles which will need to be resolved one by one based on where you would have accessed what regions. DCSMCOMMON, DCSMZ1, DCSMZ2, DcsmCommonRegsFile, DcsmZ1RegsFile, DcsmZ2RegsFile are sections of the DCSM MMRs. These will be used in the bit fields based functions where registers of DCSM are accessed. 

    Hope this is clear. 

    Thanks & Regards

    Pramod

  • Further request regarding this thread is being handled offline. Hence closing. 

    Thanks & Regards

    Pramod