CC1350/CC1310JTAG可以在程序里做禁用吗
da qin zheng sheng:
不能
Yue TANG:
一个参考吧
CC2640: How to disable JTAG by the codee2e.ti.com/…/596059
I did reset the device after setting the TAP_DAP fields from 0xC5 to 0x00. And it's true that the FP2 can't access the device any more. The reason that I observed that the IAR/J-Link can still access the chip is that, the IAR/J-Link will try to erase the whole chip first if the JTAG is locked. And after the whole chip is erased, the TAP_DAP fields are set back to 0xC5, and then the IAR/J-Link can debug.
Then I tried to disable the whole chip erase by setting the ERASE_CONF:CHIP_ERASE_DIS_N to 0. And this time the IAR/J-Link can no longer debug.
Unfortunately, my chip is locked due to some wrong operations that I haven't figured out yet. I can't find a method to re-open it. So, as you mentioned, I should be very careful when manipulating the CCFG. And I dare not to do more tests before I get all these clear. Below are my questions.
Q1: When full chip erasing is enabled and the TAP/DAPis disabled, the data on the flash can't be read by the JTAG unless a full chip erasing. Is this correct?
That is correct. There is no way to read out the FW if the other TAPs and DAPs are disabled as described in the Technical Reference Manual chapter 9.1. (www.ti.com/lit/pdf/swcu117).Q2: Can you elaborate the behavior of the HapiSectorErase(0x1F000) in the ROM? I know that it has some special handling of some CCFG data, but I don't know the details. Which data are handled specially? How are they set? Are they set to a default value or are they kept the value before the erasing?
When erasing the last page which contains the CCFG, the ROM FW will automatically re-write 0xC5 to those fields that are set to C5 by default (as described in the TRM).Q3: ERASE_CONF:CHIP_ERASE_DIS_N with 0 means that the chip can't be erased by JTAG, but the chip and the banks can still be erased by my codes. Is it right?
Yes, that is correct.Q4: ERASE_CONF:BANK_ERASE_DIS_N with 0 means that the banks can't be erased by the serial bootloader in the ROM, but it can still be erased by my codes. Is it right?If you disable bank erase, you cannot use bank erase from your application code.