[讨论] JTAG出错了!

蓝雨夜   2013-8-1 09:41 楼主
前提:测试example_canCommunication.c例程

短路CAN1,CAN2

居然会出现这个错误!
32CAN.bmp

然后想用TMS570LS31USB测试CAN1发送数据,更郁闷的是JTAG就一直不能连接上了!
31CAN.bmp

但是测试TMS570LS3137.ccxml 中“ Test Connection ” 还可以的!

[Start]

Execute the command:

%ccs_base%/common/uscif/dbgjtag -f %boarddatafile% -rv -o -F inform,logfile=yes -S pathlength -S integrity

[Result]


-----[Print the board config pathname(s)]------------------------------------

C:\DOCUME~1\ADMINI~1\LOCALS~1\APPLIC~1\.TI\
    693494126\0\0\BrdDat\testBoard.dat

-----[Print the reset-command software log-file]-----------------------------

This utility has selected a 100- or 510-class product.
This utility will load the adapter 'jioserdesusb.dll'.
The library build date was 'Jul  8 2013'.
The library build time was '22:30:21'.
The library package version is '5.1.180.0'.
The library component version is '35.34.40.0'.
The controller does not use a programmable FPGA.
The controller has a version number of '4' (0x00000004).
The controller has an insertion length of '0' (0x00000000).
This utility will attempt to reset the controller.
This utility has successfully reset the controller.

-----[Print the reset-command hardware log-file]-----------------------------

The scan-path will be reset by toggling the JTAG TRST signal.
The controller is the FTDI FT2232 with USB interface.
The link from controller to target is direct (without cable).
The software is configured for FTDI FT2232 features.
The controller cannot monitor the value on the EMU[0] pin.
The controller cannot monitor the value on the EMU[1] pin.
The controller cannot control the timing on output pins.
The controller cannot control the timing on input pins.
The scan-path link-delay has been set to exactly '0' (0x0000).

-----[The log-file for the JTAG TCLK output generated from the PLL]----------

There is no hardware for programming the JTAG TCLK frequency.

-----[Measure the source and frequency of the final JTAG TCLKR input]--------

There is no hardware for measuring the JTAG TCLK frequency.

-----[Perform the standard path-length test on the JTAG IR and DR]-----------

This path-length test uses blocks of 512 32-bit words.

The test for the JTAG IR instruction path-length succeeded.
The JTAG IR instruction path-length is 6 bits.

The test for the JTAG DR bypass path-length succeeded.
The JTAG DR bypass path-length is 1 bits.

-----[Perform the Integrity scan-test on the JTAG IR]------------------------

This test will use blocks of 512 32-bit words.
This test will be applied just once.

Do a test using 0xFFFFFFFF.
Scan tests: 1, skipped: 0, failed: 0
Do a test using 0x00000000.
Scan tests: 2, skipped: 0, failed: 0
Do a test using 0xFE03E0E2.
Scan tests: 3, skipped: 0, failed: 0
Do a test using 0x01FC1F1D.
Scan tests: 4, skipped: 0, failed: 0
Do a test using 0x5533CCAA.
Scan tests: 5, skipped: 0, failed: 0
Do a test using 0xAACC3355.
Scan tests: 6, skipped: 0, failed: 0
All of the values were scanned correctly.

The JTAG IR Integrity scan-test has succeeded.

-----[Perform the Integrity scan-test on the JTAG DR]------------------------

This test will use blocks of 512 32-bit words.
This test will be applied just once.

Do a test using 0xFFFFFFFF.
Scan tests: 1, skipped: 0, failed: 0
Do a test using 0x00000000.
Scan tests: 2, skipped: 0, failed: 0
Do a test using 0xFE03E0E2.
Scan tests: 3, skipped: 0, failed: 0
Do a test using 0x01FC1F1D.
Scan tests: 4, skipped: 0, failed: 0
Do a test using 0x5533CCAA.
Scan tests: 5, skipped: 0, failed: 0
Do a test using 0xAACC3355.
Scan tests: 6, skipped: 0, failed: 0
All of the values were scanned correctly.

The JTAG DR Integrity scan-test has succeeded.

[End]

回复评论 (7)

使用CCS UniFlash烧写 DEMO的OUT文件

[14:13:42] Loading program: C:\ti\Hercules\Hercules Safety MCU Demos\TMS570LS3x_target_sources\build\Debug\TMS570LS3x_demo_software.out
[14:15:28] WARNING >> CortexR4: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.

[14:21:09] Programs operation finished.
点赞  2013-8-1 14:22
楼主是如何把CAN1和CAN2短路在一起的呢?
如果是从MCU引脚直接短路,这样做是有危险的,容易造成引脚烧坏。

建议楼主先把短路的部分断开。

如果需要CAN1和CAN2直连,最好的办法是通过CAN收发器。
但是这样的确带来不少麻烦。
只是调CAN通信的话,用同一个CAN模块的loopback模式应该就够啦。
点赞  2013-8-1 15:17
如果断开短路的电路仍有这个错误的话,建议把整个工程发上来,我这边也用个USB Kit测试一下。
点赞  2013-8-1 15:19

回复 板凳renton 的帖子

一、刚开始用自己的板子用例程代码做测试,调试出现错误

                                   |——ISO1050(CAN1)------------------
TMS570LS0432----+                                                                |
                                   |——ISO1050(CAN2)------------------

二、后来打算用TMS570LS31USB上的CAN1做发送测试
后来LS31USB的JTAG就一直有问题!

三、还有个问题,在测试CAN的RXD,TXD脚做GIO模式下,控制不了
canIoSetPort(canREG1, 1, 0);
canIoSetPort(canREG1, 0, 1);
点赞  2013-8-1 15:25
关于楼主的问题:
1. 出现了什么样的错误呢?根本不能收发?还是数据不对?有没有用示波器观察总线上的信号呢?
2. 如果DCAN1和DCAN2的MCU引脚直连,是会有些问题的....这个我不知道您这里是怎么连接的。
    如果是CAN1TXD----CAN2RXD, CAN1RXD----CAN2TXD,那么通信不会成功,因为CAN2.0B要求每发送一个bit都要对总线状态进行监控,看看刚才发送的那个bit是否正确,有没有丢失仲裁。但是这样的链接方法一定让CAN模块认为仲裁丢失,所以无法正常通信。
    如果是CAN1TXD----CAN2RXD----CAN1RXD----CAN2TXD,那么问题更加严重......很可能损坏引脚。

3. CAN的引脚做IO的话,要配置相应的TIOC和RIOC寄存器,请参考TRM中的描述。
点赞  2013-8-1 15:48

回复 4楼renton 的帖子

原来打算用3137USB的板子做个CAN发送端的,不知道什么原因,JTAG就是一楼那个错误了!
现在没办法,把FLASH搽掉了,烧个DEMO进去,可以使用DEMO里的CAN READ功能

自己的板子就先做个CAN发送累加数据做个测试先
点赞  2013-8-1 16:30
是不是可以把不能调试的工程发上来,我测试下?
点赞  2013-8-1 18:25
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复