Other Parts Discussed in Thread: SEGGER
Hello
I am using the production version of the MSPM0L1306, flashing the device with firmware is extremely unstable. I am using a J-Link with J-Flash / Ozone. Programming an empty device is working fine but once a firmware is running it is impossible to overwrite the firmware without a full chip erase first. If no full chip erase is performed before uploading new firmware the the upload will fail and the device is sometimes becoming permanently inaccessible. No communication can be established afterward and the only way to recover is to just replace the chip.
This is the error I get when trying to flash a device that already has firmware on it:
Device "MSPM0L1306" selected. Found SW-DP with ID 0x6BA02477 DPIDR: 0x6BA02477 CoreSight SoC-400 or earlier Scanning AP map to find all available APs AP[2]: Stopped AP scan as end of AP map has been reached AP[0]: AHB-AP (IDR: 0x84770001) AP[1]: MEM-AP (IDR: 0x002E0001) Iterating through AP map to find AHB-AP to use AP[0]: Core found AP[0]: AHB-AP ROM base: 0xF0000000 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] @ F0000000 [0][0]: E00FF000 CID B105100D PID 000BB4C0 ROM Table ROMTbl[1] @ E00FF000 [1][0]: E000E000 CID B105E00D PID 000BB008 SCS [1][1]: E0001000 CID B105E00D PID 000BB00A DWT [1][2]: E0002000 CID B105E00D PID 000BB00B FPB Connected to target device. ResetTarget() start DAP initialized successfully. ResetTarget() end - Took 5.01ms Elf.GetBaseAddr(); // returns 0x0 Target.ReadU32 (0x00000000); // returns 0x4, data is 0x20000490 Target.SetReg ("SP", 0x20000490); Target.ReadU32 (0x00000004); // returns 0x4, data is 0x18D Target.SetReg ("PC", 0x18D); J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (32768 bytes) J-Link: Flash download: Total: 0.494s (Prepare: 0.035s, Compare: 0.068s, Erase: 0.152s, Program & Verify: 0.220s, Restore: 0.016s) J-Link: Flash download: Program & Verify speed: 145 KB/s Elf.GetBaseAddr(); // returns 0x0 Target.ReadU32 (0x00000000); // returns 0x4, data is 0x20000B48 Target.SetReg ("SP", 0x20000B48); Target.ReadU32 (0x00000004); // returns 0x4, data is 0x1B1 Target.SetReg ("PC", 0x1B1); Programming failed @ address 0x000018D4 (block verification error)
This is the output after the device is permanently inaccessible:
Connecting to target via SWD Found SW-DP with ID 0x6BA02477 DPIDR: 0x6BA02477 CoreSight SoC-400 or earlier Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Attach to CPU failed. Executing connect under reset. DPIDR: 0x6BA02477 CoreSight SoC-400 or earlier Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Could not find core in Coresight setup DPIDR: 0x6BA02477 CoreSight SoC-400 or earlier Scanning AP map to find all available APs AP[0]: Stopped AP scan as end of AP map has been reached Iterating through AP map to find AHB-AP to use Could not find core in Coresight setup Cannot connect to target.
Is this a known issue?