Other Parts Discussed in Thread: UNIFLASH, SEGGER,
Tool/software:
Dear TI team,
We are having devices with the CC2340R5 MCU for Bluetooth functionality and they should be coming blank from the factory. Yesterday I tried to flash a blank CC2340R5 through Segger J-Link, but it failed as it failed to erase the memory. Then I flashed the device by using Uniflash and a XDS110 debugger and after that I had no problems doing the flashing with the J-Link. My questions are - could you give me any idea why the initial flash through J-Link? Why did it fail to erase the memory? Can I fix this and how? I'm attaching a log from J-Link and the CCFG (in Intel HEX format) of the blank device.
Connecting to target via SWD ConfigTargetSettings() start Flash breakpoints are disabled. ConfigTargetSettings() end - Took 362us InitTarget() start CFG-AP DEVICEID: 0x1BB8402F PG2.0 device detected CFG-AP DEVICESTATUS: 0x034D8105 Checking if AHB-AP is enabled... AHB-AP enabled --> Attaching to the target... InitTarget() end - Took 8.05ms Found SW-DP with ID 0x6BA02477 DPIDR: 0x6BA02477 CoreSight SoC-400 or earlier AP map detection skipped. Manually configured AP map found. AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410CC601. Implementer code: 0x41 (ARM) Found Cortex-M0 r0p1, Little endian. FPUnit: 4 code (BP) slots and 0 literal slots CoreSight components: ROMTbl[0] @ E00FF000 [0][0]: E000E000 CID B105E00D PID 000BB008 SCS [0][2]: E0002000 CID B105E00D PID 000BB00B FPB Memory zones: Zone: "Default" Description: Default access mode Cortex-M0 identified. J-Link>erase No address range specified, 'Erase Chip' will be executed 'erase': Performing implicit reset & halt of MCU. ResetTarget() start Executing reset via SEC-AP in order to enter SACI mode... O.K. Executing exit SACI mode sequence... O.K. Checking if AHB-AP is enabled... O.K. Checking if debug probe loop entered... O.K. Invalid application entry addr detected: 0xFFFFFFFF ResetTarget() end - Took 118ms Device specific reset executed. Erasing device... ****** Error: Failed to erase sectors 0 @ address 0x00000000 (Unspecified error #1) FLASH_RAMLESS: Failed to erase target via J-Link J-Link: Flash download: Total time needed: 0.361s (Prepare: 0.007s, Compare: 0.000s, Erase: 0.352s, Program: 0.000s, Verify: 0.000s, Restore: 0.001s) ERROR: Erase returned with error code -5. J-Link>exit OnDisconnectTarget() start Executing SWD => dormant switching sequence... OnDisconnectTarget() end - Took 208ms
:020000044E02AA :20000000FFFFFFFF00000000FFFFFFFF1CDF4421FFFFFFFFFFFFFFFFAAAAAAAA00000000E8 :20002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000D0 :200040000000000000000000000000000000000000000000000000000000000000000000A0 :20006000000000000000000000000000000000000000000000000000000000000000000080 :20008000000000000000000000000000000000000000000000000000000000000000000060 :2000A000000000000000000000000000000000000000000000000000000000000000000040 :2000C000000000000000000000000000000000000000000000000000000000000000000020 :2000E000000000000000000000000000000000000000000000000000000000000000000000 :200100000000000000000000000000000000000000000000000000000000000000000000DF :200120000000000000000000000000000000000000000000000000000000000000000000BF :2001400000000000000000000000000000000000000000000000000000000000000000009F :2001600000000000000000000000000000000000000000000000000000000000000000007F :2001800000000000000000000000000000000000000000000000000000000000000000005F :2001A00000000000000000000000000000000000000000000000000000000000000000003F :2001C00000000000000000000000000000000000000000000000000000000000000000001F :2001E0000000000000000000000000000000000000000000000000000000000000000000FF :200200000000000000000000000000000000000000000000000000000000000000000000DE :200220000000000000000000000000000000000000000000000000000000000000000000BE :2002400000000000000000000000000000000000000000000000000000000000000000009E :2002600000000000000000000000000000000000000000000000000000000000000000007E :2002800000000000000000000000000000000000000000000000000000000000000000005E :2002A00000000000000000000000000000000000000000000000000000000000000000003E :2002C00000000000000000000000000000000000000000000000000000000000000000001E :2002E0000000000000000000000000000000000000000000000000000000000000000000FE :200300000000000000000000000000000000000000000000000000000000000000000000DD :200320000000000000000000000000000000000000000000000000000000000000000000BD :2003400000000000000000000000000000000000000000000000000000000000000000009D :2003600000000000000000000000000000000000000000000000000000000000000000007D :2003800000000000000000000000000000000000000000000000000000000000000000005D :2003A00000000000000000000000000000000000000000000000000000000000000000003D :2003C00000000000000000000000000000000000000000000000000000000000000000001D :2003E0000000000000000000000000000000000000000000000000000000000000000000FD :200400000000000000000000000000000000000000000000000000000000000000000000DC :200420000000000000000000000000000000000000000000000000000000000000000000BC :2004400000000000000000000000000000000000000000000000000000000000000000009C :2004600000000000000000000000000000000000000000000000000000000000000000007C :2004800000000000000000000000000000000000000000000000000000000000000000005C :2004A00000000000000000000000000000000000000000000000000000000000000000003C :2004C00000000000000000000000000000000000000000000000000000000000000000001C :2004E0000000000000000000000000000000000000000000000000000000000000000000FC :200500000000000000000000000000000000000000000000000000000000000000000000DB :200520000000000000000000000000000000000000000000000000000000000000000000BB :2005400000000000000000000000000000000000000000000000000000000000000000009B :2005600000000000000000000000000000000000000000000000000000000000000000007B :2005800000000000000000000000000000000000000000000000000000000000000000005B :2005A00000000000000000000000000000000000000000000000000000000000000000003B :2005C00000000000000000000000000000000000000000000000000000000000000000001B :2005E0000000000000000000000000000000000000000000000000000000000000000000FB :200600000000000000000000000000000000000000000000000000000000000000000000DA :200620000000000000000000000000000000000000000000000000000000000000000000BA :2006400000000000000000000000000000000000000000000000000000000000000000009A :2006600000000000000000000000000000000000000000000000000000000000000000007A :2006800000000000000000000000000000000000000000000000000000000000000000005A :2006A00000000000000000000000000000000000000000000000000000000000000000003A :2006C00000000000000000000000000000000000000000000000000000000000000000001A :2006E0000000000000000000000000000000000000000000000000000000000000000000FA :200700000000000000000000000000000000000000000000000000000000000000000000D9 :200720000000000000000000000000000000000000000000000000000000000000000000B9 :20074000000000000000000000000000AC54537D00000000000000000000000000000000C9 :20076000000000000000000000000000000000000000000000000000000000000000000079 :20078000000000000000000000000000000000000000000000000000000000000000000059 :2007A000000000000000000000000000000000000000000000000000000000000000000039 :2007C0000000000000000000000000000C0ED7155AA500000101020305080D156DD7E43680 :2007E000EBF431DF95AE15EE03BA8EE4C4C63FD8453F675E74D7C2012C9058E5A2947252AA :0108000000F7 :00000001FF