Ошибка конфигурации платы Atmel at91saml21j18b с подключением Jtag через сервер Openocd - PullRequest
1 голос
/ 24 мая 2019

Здравствуйте, на самом деле я пытаюсь связать плату samdl21 с Jtag через сервер openocd. Я сталкиваюсь с некоторой проблемой в конфигурации, когда он выдает неверный ACK (0) в ошибке ответа DAP ... кто-то, пожалуйста, помогите мне найтирешение этой проблемы.

-------- проверьте следующие журналы на наличие ошибок --------

    Open On-Chip Debugger 0.10.0+dev-00738-gc3b90c0 (2019-03-12-12:23)
    Licensed under GNU GPL v2
    For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
    WARNING!
    This file was not tested with real interface, but is assumed to work as this
    interface uses the same layout as configs that were verified. Please report your
    experience with this file to openocd-devel mailing list, so it could be marked
    as working or fixed.
    Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
    adapter speed: 1500 kHz
    none separate
    adapter speed: 400 kHz
    cortex_m reset_config sysresetreq
    Info : Listening on port 6666 for tcl connections
    Info : Listening on port 4444 for telnet connections
    Info : clock speed 400 kHz
    Error: JTAG scan chain interrogation failed: all zeroes
    Error: Check JTAG interface, timings, target power, etc.
    Error: Trying to use configured scan chain anyway...
    Error: at91samd.cpu: IR capture error; saw 0x00 not 0x01
    Warn : Bypassing JTAG setup events due to errors
    Error: Invalid ACK (0) in DAP response
    Error: Invalid ACK (0) in DAP response

------------ Скрипт конфигурации, используемый для интерфейса -----------------

# script for Atmel SAMD, SAMR, SAML or SAMC, a Cortex-M0 chip
# samdXX devices only support SWD transports.

source [find target/swj-dp.tcl]

if { [info exists CHIPNAME] } {
   set _CHIPNAME $CHIPNAME
} else {
   set _CHIPNAME at91samd
}

if { [info exists ENDIAN] } {
   set _ENDIAN $ENDIAN
} else {
   set _ENDIAN little
}

# Work-area is a space in RAM used for flash programming
# By default use 2kB
if { [info exists WORKAREASIZE] } {
   set _WORKAREASIZE $WORKAREASIZE
} else {
   set _WORKAREASIZE 0x800
}

if { [info exists CPUTAPID] } {
   set _CPUTAPID $CPUTAPID
} else {
   set _CPUTAPID 0x4ba00477
}
adapter_khz 1500
#swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID -ignore-version

dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap

$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0

# dsu_reset_deassert configures whether we want to run or halt out of reset,
# then instruct the DSU to let us out of reset.
$_TARGETNAME configure -event reset-deassert-post {
        at91samd dsu_reset_deassert
}

# SRST (wired to RESET_N) resets debug circuitry
# srst_pulls_trst is not configured here to avoid an error raised in reset halt
reset_config srst_gates_jtag

adapter_khz 400

# Atmel's EDBG (on-board cmsis-dap adapter of Xplained kits) works
# without problem at maximal clock speed. Atmel recommends
# adapter speed less than 10 * CPU clock.
# adapter_khz 5000

if {![using_hla]} {
   # if srst is not fitted use SYSRESETREQ to
   # perform a soft reset
   cortex_m reset_config sysresetreq
}

set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME at91samd 0x00000000 0 1 1 $_TARGETNAME
...