Hi,
I am using J-Link 6.22d / Ozone 2.54a via a USB J-Link Plus to an Atmel ATSAME70Q21 (Cortex-M7) controller. The debugger connects and identifies the core, but the RAMCode fails to program.
-------------------------------------
J-Link: Device "ATSAME70Q21" selected.
J-Link: Found SW-DP with ID 0x0BD11477
J-Link: Scanning AP map to find all available APs
J-Link: AP[1]: Stopped AP scan as end of AP map has been reached
J-Link: AP[0]: AHB-AP (IDR: 0x04770041)
J-Link: Iterating through AP map to find AHB-AP to use
J-Link: AP[0]: Core found
J-Link: AP[0]: AHB-AP ROM base: 0xE00FD000
J-Link: CPUID register: 0x410FC271. Implementer code: 0x41 (ARM)
J-Link: Found Cortex-M7 r0p1, Little endian.
J-Link: FPUnit: 8 code (BP) slots and 0 literal slots
J-Link: CoreSight components:
J-Link: ROMTbl[0] @ E00FD000
J-Link: ROMTbl[0][0]: E00FE000, CID: B105100D, PID: 000BB4C8 ROM Table
J-Link: ROMTbl[1] @ E00FE000
J-Link: ROMTbl[1][0]: E00FF000, CID: B105100D, PID: 000BB4C7 ROM Table
J-Link: ROMTbl[2] @ E00FF000
J-Link: ROMTbl[2][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
J-Link: ROMTbl[2][1]: E0001000, CID: B105E00D, PID: 000BB002 DWT
J-Link: ROMTbl[2][2]: E0002000, CID: B105E00D, PID: 000BB00E FPB-M7
J-Link: ROMTbl[2][3]: E0000000, CID: B105E00D, PID: 000BB001 ITM
J-Link: ROMTbl[1][1]: E0041000, CID: B105900D, PID: 000BB975 ETM-M7
J-Link: ROMTbl[0][1]: E0040000, CID: B105900D, PID: 000BB9A9 TPIU-M7
J-Link: Cache: Separate I- and D-cache.
J-Link: I-Cache L1: 16 KB, 256 Sets, 32 Bytes/Line, 2-Way
J-Link: D-Cache L1: 16 KB, 128 Sets, 32 Bytes/Line, 4-Way
J-Link: connected to target device
J-Link: Failed to download RAMCode.
Failed to prepare for programming.
Failed to download RAMCode!
--------------------------------------------------------
I guessed that the problem might be that the on-chip watchdog might be restting, as according to the datasheet it does run from startup. So i added the following to the Ozone project.
Target.WriteU32 (400E1854, 0x00008000); // the WDT, bit 15 (1 - disables)
Target.WriteU32 (400E1904, 0x00008000); // the RSWDT, bit 15 (1 - disables)
there was then a pause of several seconds, but RAMCode download still failed.
Now Ozone says..
J-Link: Failed to restore target. RAMCode never stops
and J-Link commander says.
Erasing device (ATSAME70Q21)...
J-Link: Flash download: Total time needed: 0.027s (Prepare: 0.025s, Compare: 0.000s, Erase: 0.001s, Program: 0.000s, Verify: 0.000s, Restore: 0.000s)
****** Error: Failed to restore target. RAMCode never stops
ERROR: Erase returned with error code -5.
So it looks like this is some compatibility problem with the version of J-Link and the ATSAME70Q21 chip.
I am using J-Link 6.22d / Ozone 2.54a via a USB J-Link Plus to an Atmel ATSAME70Q21 (Cortex-M7) controller. The debugger connects and identifies the core, but the RAMCode fails to program.
-------------------------------------
J-Link: Device "ATSAME70Q21" selected.
J-Link: Found SW-DP with ID 0x0BD11477
J-Link: Scanning AP map to find all available APs
J-Link: AP[1]: Stopped AP scan as end of AP map has been reached
J-Link: AP[0]: AHB-AP (IDR: 0x04770041)
J-Link: Iterating through AP map to find AHB-AP to use
J-Link: AP[0]: Core found
J-Link: AP[0]: AHB-AP ROM base: 0xE00FD000
J-Link: CPUID register: 0x410FC271. Implementer code: 0x41 (ARM)
J-Link: Found Cortex-M7 r0p1, Little endian.
J-Link: FPUnit: 8 code (BP) slots and 0 literal slots
J-Link: CoreSight components:
J-Link: ROMTbl[0] @ E00FD000
J-Link: ROMTbl[0][0]: E00FE000, CID: B105100D, PID: 000BB4C8 ROM Table
J-Link: ROMTbl[1] @ E00FE000
J-Link: ROMTbl[1][0]: E00FF000, CID: B105100D, PID: 000BB4C7 ROM Table
J-Link: ROMTbl[2] @ E00FF000
J-Link: ROMTbl[2][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
J-Link: ROMTbl[2][1]: E0001000, CID: B105E00D, PID: 000BB002 DWT
J-Link: ROMTbl[2][2]: E0002000, CID: B105E00D, PID: 000BB00E FPB-M7
J-Link: ROMTbl[2][3]: E0000000, CID: B105E00D, PID: 000BB001 ITM
J-Link: ROMTbl[1][1]: E0041000, CID: B105900D, PID: 000BB975 ETM-M7
J-Link: ROMTbl[0][1]: E0040000, CID: B105900D, PID: 000BB9A9 TPIU-M7
J-Link: Cache: Separate I- and D-cache.
J-Link: I-Cache L1: 16 KB, 256 Sets, 32 Bytes/Line, 2-Way
J-Link: D-Cache L1: 16 KB, 128 Sets, 32 Bytes/Line, 4-Way
J-Link: connected to target device
J-Link: Failed to download RAMCode.
Failed to prepare for programming.
Failed to download RAMCode!
--------------------------------------------------------
I guessed that the problem might be that the on-chip watchdog might be restting, as according to the datasheet it does run from startup. So i added the following to the Ozone project.
Target.WriteU32 (400E1854, 0x00008000); // the WDT, bit 15 (1 - disables)
Target.WriteU32 (400E1904, 0x00008000); // the RSWDT, bit 15 (1 - disables)
there was then a pause of several seconds, but RAMCode download still failed.
Now Ozone says..
J-Link: Failed to restore target. RAMCode never stops
and J-Link commander says.
Erasing device (ATSAME70Q21)...
J-Link: Flash download: Total time needed: 0.027s (Prepare: 0.025s, Compare: 0.000s, Erase: 0.001s, Program: 0.000s, Verify: 0.000s, Restore: 0.000s)
****** Error: Failed to restore target. RAMCode never stops
ERROR: Erase returned with error code -5.
So it looks like this is some compatibility problem with the version of J-Link and the ATSAME70Q21 chip.
The post was edited 2 times, last by matthewjfletcher ().