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.

运行PRU-SWPKG安装包的例程,提示PRU_0: Error connecting to the target: (Error -1170 @ 0x4A322000)

Other Parts Discussed in Thread: AM3356, AM3359, PRUCAPE

工程师们,我用AM335x小板(XAM3359AZCZ100,Beaglebone Black)调试PRU的例程,例程路径:C:\ti\pru\examples\am335x\


例程1:

PRU_0:

Error connecting to the target: (Error -1170 @ 0x4A322000)

Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).

(Emulation package 6.0.407.3) 

例程2:PRU_RPMsg_Echo_Interrupt0

build无错误,但debug提示

PRU_0: 

Error connecting to the target:
(Error -1170 @ 0x4A322000)
Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
(Emulation package 6.0.407.3)

以上报错内容一致, 尝试以下解决方法:

(1)只启用PRU1,结果报错PRU_1:Error connecting to the target...

(2)调试StarterWave裸机例程能正常运行,可排除JTAG错误。

请问,如何解决这个问题,让beaglebone black(XAM3359AZCZ100)能跑PRU的例程呢。


  • 应该是PRU这部分没有做初始化,要用gel文件初始化一下

  • 谢谢。

    可否具体一点呢,我的CCS版本是6.1.2.0045。

  • 按照您的建议,我随后在*.xxcml文件的Advanced选项里,加入了gel文件。

    (1)CortexA8
    TI XDS100v3 USB Debug Probe_0
    ---AM3359_0
    ------IcePick_D_0
    ---------DAP
    ------------CS_DAP_DebugSS
    ---------------ModenaSS
    ------------------CortxA8

    在CortxA8的右侧initialzation script加入路径
    ..\..\emulation\boards\beaglebone\gel\beagleboneblack.gel

    (2)PRU_0和PRU_1
    TI XDS100v3 USB Debug Probe_0
    ---AM3359_0
    ------IcePick_D_0
    ---------DAP
    ------------CS_DAP_DebugSS
    ---------------PRU
    ------------------PRU_0
    ------------------PRU_1

    分别在PRU_0和PRU_1右侧的initialzation script加入路径
    ..\..\emulation\boards\beaglebone\gel\AM335x_PRU_ICSS.gel

    test connection和build依旧正常,debug依旧报错:

    PRU_0:

    Error connecting to the target: (Error -1170 @ 0x4A322000)

    Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).

    (Emulation package 6.0.407.3) 

  • 你需要注意下你的GEL文件中,是否有初始化PRU?印象中,貌似要load两个GEL去初始化PRU的,本身自带的那个GEL文件是只会做ARM的初始化和DDR的初始化,因此你只能使能ARM,使用ARM本身的资源,并不能用PRU的。

    你能否把你的GEL发上来?

    PS: 另外查一下,你的芯片的丝印上是AM3356,或者7,8,9吧,如果是52,54,上面没PRU,做啥都是白搭。

  • 谢谢你的解答。

    我导入工程(PRU_gpioToggle)后新建xxcml文件,DAP右侧的Initialization script都默认指定了gel文件,如下:

    CortexA8

    ..\..\emulation\boards\beaglebone\gel\beagleboneblack.gel
    PRU_0
    ..\..\emulation\gel\AM335x_PRU_ICSS_local.gel
    PRU_1
    ..\..\emulation\gel\AM335x_PRU_ICSS_local.gel

    我原以为AM335x_PRU_ICSS_local.gel这个文件不对,就把它换成AM335x_PRU_ICSS.gel,结果还是一样,报错

    PRU_0: Error connecting to the target: (Error -1170 @ 0x4A322000) Unable to access the DAP.

    打开文件beagleboneblack.gel,发现有下面这句代码:

    GEL_LoadGel("$(GEL_file_dir)/AM335x_PRU_ICSS.gel");

    然后我更进一步跟踪4A322000,在AM335x_PRU_ICSS.gel文件中发现了三处:

    (1)

    hotmenu PRU_ICSS_PRUcore0_SoftReset()
    {
    GEL_TextOut("\t**** PRU-ICSS PRU0 Reset is in progress **** \n","Output",1,1,1);
    *((unsigned int*) 0x4A322000) &= 0xFFFFFFFE;
    GEL_TextOut("\t**** PRU-ICSS PRU0 Reset is Done **** \n","Output",1,1,1);

    }

    (2)

    hotmenu PRU_ICSS_PRUcore0_and_1_Start()
    {
    GEL_TextOut("\t**** PRU-ICSS PRU0&1 is being started **** \n","Output",1,1,1);
    *((unsigned int*) 0x4A324000) = 0xB;
    *((unsigned int*) 0x4A322000) = 0xB;
    }

    (3)

    hotmenu PRU_ICSS_PRUcore0_and_1_Start()
    {
    GEL_TextOut("\t**** PRU-ICSS PRU0&1 is being started **** \n","Output",1,1,1);
    *((unsigned int*) 0x4A324000) = 0xB;
    *((unsigned int*) 0x4A322000) = 0xB;
    }

    至此,我就不知道怎么解决了。

    在debug过程中程序报错,Load按钮是灰色的没法加载。

    PS:我用的是中国版的Beaglebone Black,芯片为XAM3359AZCZ100。

  • 刚忘记加附件了,附件是三个gel文件。

    beagleboneblack.gel

    AM335x_PRU_ICSS_local.gel

    AM335x_PRU_ICSS.gel

    GEL文件.rar
  • 推荐你看下这篇hands on文档:

    http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs

  • 谢谢。

    我的软件环境与链接一致,硬件缺少PRU Cape。

    按照Lab1,报错。然后我给PRU_0和PRU_1加入了AM335x_PRU_ICSS.gel文件,也报同样的错误。

    见下图。

  • 你的gel脚本执行的时候,有打印PRU初始化这部分信息么?

  • console打印信息中,没有PRU初始化信息。

    CortxA8: Output: **** AM335x BeagleBlack Initialization is in progress ..........
    CortxA8: Output: **** AM335x ALL PLL Config for OPP == OPP100 is in progress .........
    CortxA8: Output: Input Clock Read from SYSBOOT[15:14]: 24MHz
    CortxA8: Output: **** Going to Bypass...
    CortxA8: Output: **** Bypassed, changing values...
    CortxA8: Output: **** Locking ARM PLL
    CortxA8: Output: **** Core Bypassed
    CortxA8: Output: **** Now locking Core...
    CortxA8: Output: **** Core locked
    CortxA8: Output: **** DDR DPLL Bypassed
    CortxA8: Output: **** DDR DPLL Locked
    CortxA8: Output: **** PER DPLL Bypassed
    CortxA8: Output: **** PER DPLL Locked
    CortxA8: Output: **** DISP PLL Config is in progress ..........
    CortxA8: Output: **** DISP PLL Config is DONE ..........
    CortxA8: Output: **** AM335x ALL ADPLL Config for OPP == OPP100 is Done .........
    CortxA8: Output: **** AM335x DDR3 EMIF and PHY configuration is in progress.........
    CortxA8: Output: EMIF PRCM is in progress .......
    CortxA8: Output: EMIF PRCM Done
    CortxA8: Output: DDR PHY Configuration in progress
    CortxA8: Output: Waiting for VTP Ready .......
    CortxA8: Output: VTP is Ready!
    CortxA8: Output: DDR PHY CMD0 Register configuration is in progress .......
    CortxA8: Output: DDR PHY CMD1 Register configuration is in progress .......
    CortxA8: Output: DDR PHY CMD2 Register configuration is in progress .......
    CortxA8: Output: DDR PHY DATA0 Register configuration is in progress .......
    CortxA8: Output: DDR PHY DATA1 Register configuration is in progress .......
    CortxA8: Output: Setting IO control registers.......
    CortxA8: Output: EMIF Timing register configuration is in progress .......
    CortxA8: Output: EMIF Timing register configuration is done .......
    CortxA8: Output: PHY is READY!!
    CortxA8: Output: DDR PHY Configuration done
    CortxA8: Output: **** AM335x BeagleBlack Initialization is Done ******************

    PRU_0: Error connecting to the target: (Error -1170 @ 0x4A322000) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.407.3) 

    这个0x4A322000在AM335x_PRU_ICSS.gel中的三个函数中有出现。

    hotmenu PRU_ICSS_PRUcore0_SoftReset();

    hotmenu PRU_ICSS_PRUcore0_and_1_Start();

    hotmenu PRU_ICSS_PRUcore0_and_1_Halt();

  • 我是否可以这样去理解,AM335x_PRU_ICSS.gel文件里的一些函数用来初始化PRU,但是这些函数在执行过程中,出错了,

    报错PRU_0: Error connecting to the target: (Error -1170 @ 0x4A322000)。

  • 在运行完335的init后,要手动执行PRU_ICSS_Init脚本。这个在你的CCS debug界面中,script下面有,你要点一下,运行它,他才能初始化PRU,从而后面才能正常的使用。

  • 按照您的提示,执行菜单项Scripts\PRU_ICSS\PRU_ICSS_Init,确实多了PRU初始化打印信息:

    CortxA8: Output: **** PRU-ICSS PRCM Enable Step 1 is in progress ****
    CortxA8: Output: **** PRU-ICSS PRCM Enable Step 1 is Done ****
    CortxA8: Output: **** PRU-ICSS PRCM Enable Step 2 is in progress ****
    CortxA8: Output: **** PRU-ICSS PRCM Enable Step 2 is Done ****
    CortxA8: Output: **** PRU-ICSS PRCM Reset is in progress ****
    CortxA8: Output: **** PRU-ICSS PRCM Reset is Done ****

    现在,connection, build, debug都可以进行了,就是没有效果,Beaglebone Black(AM3359)小板LED灯无闪烁,是否跟PRU Cape有关系。

    下一步,我就看看PRU_gpioToggle这个工程究竟是怎么执行,实现点灯。

    有关于PRU例程介绍的,麻烦给个链接。

    感谢工程师们的耐心回复!

  • PRU cable可以从官网购买:

    http://www.ti.com/tool/PRUCAPE

    我上次给你发的链接有GPIO的介绍啊:http://processors.wiki.ti.com/index.php/PRU_Training:_Hands-on_Labs?keyMatch=PRU gel&tisearch=Search-EN#LAB_2:_Read_Push_Button_Switch_on_PRU0_GPI_.26_Toggle_LED_with_PRU1_GPO

  • 问题解决了吗?我碰到和你一样的问题,就是灯不闪。是不是要配置pin什么的,现在ti的工程师太菜了。啥问题都解决不了