Other Parts Discussed in Thread: UNIFLASH
Tool/software:
Hello,
I'm having problem with the JTAGLOCK function.
The aim is to disable the JTAG access in the last station of EOL. Thus I implement this procedure by using the diagnostic service.
I've contacted the local FAE, and get the infomation which is
1. There're four registiers need to be modified, JTAGPSWDH0, JTAGPSWDH1, JTAGPSWDL0, JTAGPSWDL1 and Z1OTP_JLM_ENABLE.
2. These registers can be modified only by flash operation.
Refer to the flash example code, I tried to write some test codes.
step 1, intialize the fmc registier
Fapi_initializeAPI(F021_CPU0_BASE_ADDRESS, 100);
step 2, earase the sectors
Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, (uint32_t*)0x78006u); while(Fapi_checkFsmForReady() != Fapi_Status_FsmReady); Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, (uint32_t*)0x78014u); while(Fapi_checkFsmForReady() != Fapi_Status_FsmReady); Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, (uint32_t*)0x78016u); while(Fapi_checkFsmForReady() != Fapi_Status_FsmReady); Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, (uint32_t*)0x7803Cu); while(Fapi_checkFsmForReady() != Fapi_Status_FsmReady); Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, (uint32_t*)0x7803Eu); while(Fapi_checkFsmForReady() != Fapi_Status_FsmReady);
Here I have a question, if these registers are designed as the internal flash, does that mean I just have to earase the whole sector once, with the head address of the sector?
step3, progarm the password registers
Fapi_issueProgrammingCommand((uint32_t*)0x78014u, &RxDataTemp[0], 4, 0, 0, Fapi_AutoEccGeneration); while(Fapi_checkFsmForReady() != Fapi_Status_FsmReady); Fapi_issueProgrammingCommand((uint32_t*)0x7803Cu, &RxDataTemp[2], 4, 0, 0, Fapi_AutoEccGeneration); while(Fapi_checkFsmForReady() != Fapi_Status_FsmReady);
step4, enable the jtaglock function
Fapi_issueProgrammingCommand((uint32_t*)0x78006u, &Jtaglock_Key, 2, 0, 0, Fapi_AutoEccGeneration); while(Fapi_checkFsmForReady() != Fapi_Status_FsmReady);
Unfortunately, I have not found any example codes of how to implement, and all the relative documents I found only describe the function activation by using CCS' on-chip flash component, thus I don't know I'm having the correct procedure or not.
Here're the problems.
The password registers seem to be modified successfully. And the last step should also be done, because I can't connect target any more.
I tried to input the password into the JLM, then connect again, nothing happend but failed.
The CCS version is 12.8.
I also did some other tests on another target borad. This time I enable the function by using on-chip flash component. But I didn't change the password because it seems can not be changed. So I just enable the JTAGLOCK, nothing else. Well, this time I got a little luck, at least the target can be connected with the default password under UniFlash.
And I found another difference between the two boards. The second board( on-chip flash dude) actually running well with the pre-downloaded firmware; the first board is totally stucked! It doesn't run the software at all, and can not be connected even under the UniFlash. So, totally mess!
Nevertheless, please help me with it, looking forward your reply. Thanks.