This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/AM5728: Getting "(Error -1065 @ 0x3D5A) Unable to access device memory" on running the init script.

Part Number: AM5728


Tool/software: Code Composer Studio

Hi all, 

I try to run a HelloWorld on the Cortex-M4 of my BeagleBoard X15. 

After I connect the A15 and running the init script AM572x_MULTICORE_EnableAllCores() I get the following output. 

CortexA15_0: Trouble Writing Memory Block at 0x54160244 on Page 0 of Length 0x4: (Error -1065 @ 0x3D5A) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 7.0.100.0) 
AM572x_MULTICORE_EnableAllCores() cannot be evaluated.
Target failed to write 0x54160244
	 at *((unsigned int *) (0x54160200+0x00000044))=(unsigned int) ((0x5<<4)|0x1) [AM572x_multicore_reset.gel:18]
	 at AM572x_MULTICORE_EnableAllCores()

The full debug console log is: 

Cortex_M4_IPU2_C0: GEL Output: --->>> AM572x Cortex M4 Startup Sequence In Progress... <<<---
Cortex_M4_IPU2_C0: GEL Output: --->>> AM572x Cortex M4 Startup Sequence DONE! <<<---
Cortex_M4_IPU2_C1: GEL Output: --->>> AM572x Cortex M4 Startup Sequence In Progress... <<<---
Cortex_M4_IPU2_C1: GEL Output: --->>> AM572x Cortex M4 Startup Sequence DONE! <<<---
Cortex_M4_IPU1_C0: GEL Output: --->>> AM572x Cortex M4 Startup Sequence In Progress... <<<---
Cortex_M4_IPU1_C0: GEL Output: --->>> AM572x Cortex M4 Startup Sequence DONE! <<<---
Cortex_M4_IPU1_C1: GEL Output: --->>> AM572x Cortex M4 Startup Sequence In Progress... <<<---
Cortex_M4_IPU1_C1: GEL Output: --->>> AM572x Cortex M4 Startup Sequence DONE! <<<---
IcePick_D: GEL Output: Ipu RTOS is released from Wait-In-Reset. 
IcePick_D: GEL Output: Ipu SIMCOP is released from Wait-In-Reset. 
IcePick_D: GEL Output: IVAHD C66 is released from Wait-In-Reset. 
IcePick_D: GEL Output: IVAHD ICONT1 is released from Wait-In-Reset. 
IcePick_D: GEL Output: IVAHD ICONT2 is released from Wait-In-Reset. 
CS_DAP_DebugSS: GEL Output: --->>> CONFIGURE DEBUG DPLL settings to 1.9 GHZs  <<<---
CS_DAP_DebugSS: GEL Output: > Setup DebugSS 1.9GHz in progress...
CS_DAP_DebugSS: GEL Output: < Done with Setup DebugSS Trace export clock (TPIU) to 97MHz 
CS_DAP_DebugSS: GEL Output: < Done with Setup DebugSS PLL Clocking 1.9GHz 
CS_DAP_DebugSS: GEL Output: < Done with Setup DebugSS ATB Clocking 380MHz 
CS_DAP_DebugSS: GEL Output: < Done with Setup DebugSS Trace export clock (TPIU) to 97MHz 
CS_DAP_DebugSS: GEL Output: --->>> TURNING ON L3_INSTR and L3_3 clocks required for debug instrumention <<<<<<----
CS_DAP_DebugSS: GEL Output: ---<<< L3 instrumentation clocks are enabled >>>> ---
CS_DAP_DebugSS: GEL Output: --->>> Mapping TIMER supsend sources to default cores <<<<<<----
CS_DAP_PC: GEL Output: Cortex-A15 1 is not in WIR mode so nothing to do.
CortexA15_0: GEL Output: --->>> Mapping TIMER suspend sources to default cores <<<<<<----
CortexA15_0: Trouble Writing Memory Block at 0x54160244 on Page 0 of Length 0x4: (Error -1065 @ 0x3D5A) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 7.0.100.0) 
AM572x_MULTICORE_EnableAllCores() cannot be evaluated.
Target failed to write 0x54160244
	 at *((unsigned int *) (0x54160200+0x00000044))=(unsigned int) ((0x5<<4)|0x1) [AM572x_multicore_reset.gel:18]
	 at AM572x_MULTICORE_EnableAllCores()

Any help is appreciated. 

Kind regards 

Chris 

  • I've found out that the address was in the L3_INSTR Memory Map and I found out that the PMIC was not in POWERHOLD mode, shutting down after 8 seconds. I fixed that. 

    Now I face writing problems to 0x4ae06510 which is the L4_WKUP Memory Map. 

    CortexA15_0: Trouble Writing Memory Block at 0x4ae06510 on Page 0 of Length 0x4: (Error -1065 @ 0x3D5A) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 7.0.100.0) 
    IPU1SSClkEnable_API() cannot be evaluated.
    Target failed to write 0x4AE06510
    	 at *((unsigned int *) ((cpu_num==1) ? (((0x4AE00000+0x6000)+0x500)+0x10) : (((0x4AE00000+0x6000)+0x700)+0x210)))=(unsigned int) 0x7 [AM572x_multicore_reset.gel:18]
    	 at IPUSSClkEnable(1) [AM572x_multicore_reset.gel:274]
    	 at IPU1SSClkEnable_API()IcePick_D: Power Failure on Target CPU 
    

    Any hints?

  • Hi,

    It seems strange, but I suspect that pre-loaded software (Linux or pre-flashed software) running on the target may be causing this disruption.

    You can open a Memory Browser and inspect the failing memory region. What do you see at the specific address? Can you modify it? 

    If that is not possible, perhaps you could try to stop the autoboot process on u-boot (before Linux kicks in) and see if things improve after connecting. 

    I couldn't reproduce this issue in a large AM572x EVM, but in my case I don't have code running.

    Hope this helps,

    Rafael

  • Hi, 

    thanks for the response. 

    Surprisingly, there is a linux running from eMMC. 

    Is it still possible to Debug the Cortex-M4, bypassing the A15 core? Are there some ressourceses/wiki pages to continue reading? 

    Kind regards 

    Chris 

    Code Composer Studio: 7.4.0.00015

    HW: BeagleBoard X15

    Debug probe: XDS100v3 from Olimex

  • A switch to the CCS 6.2.0 solved my problem. I am now able to connect to the Cortex M4 while running Linux without getting error messages.
  • Chris,

    Thank you for reporting back your findings. It is certainly a surprising outcome and I can think of one possible component that has a direct impact on this: the GEL files shipped with 6.2.0 are different than the ones of 7.4.0.

    I will try to find a BeagleBoard X15 and reproduce this issue here. I will report back if I find anything relevant.

    Regards,
    Rafael
  • Rafael,

    I did further testing because the CCSv6.2 started throwing errors and saying "Unable to access the DAP." after I have installed the RTOS SDK into the same directory as CCSv6 and clicking through the update process.

    Same thing with CCSv7.3. Works without RTOS SDK - and "Unable to access the DAP." with RTOS SDK.

    Kind regards
    Chris
  • Chris,

    I am not entirely sure I understand the new scenario, given that any installed SDK only influences the connected device when it is loaded to it. Otherwise, it sits quietly in your hard drive motionless.

    If you are having these issues after loading SDK code to the device, then it may explain the error message - perhaps the software is causing the device to lock up inadvertently.

    If that is happening, one detail you can try to pursue is to disable the Auto-Run to main() and see if you can single-step the code from the Entry point to main.

    To disable this, please check the subsection Auto Run and launch options of:
    software-dl.ti.com/.../sdto_ccs_debug-handbook.html

    Regards,
    Rafael