【转】AXD:RDI severe error 00602:can't halt...

来源:百度文库 编辑:神马文学网 时间:2024/04/29 07:11:18

AXD:RDI severe error 00602:can'thalt...

    毕业时候买的44B0X公板,一直觉得自己的知识体系跟不上,忙着恶补LINUX知识,除跑过Led_test之外就没动过它了。今天把ADS1.2下面的例程Led_test改在GNU下编译,写了个简单MakeFile生成bin,然后用AXD调试,直接load到RAM memory0x0c000000处run,单步,全速都可以。
快下班时候,突然想试一下flash中运行如何,flashp刚启动擦除的时候,隔壁桌子的同事在忙着用酒精清洗昨晚米奇大鼠留下的杰作,我只看到我的电脑屏幕黑了一下,晕!断电!估计flash 要over了!记得当年我的硬盘在ghost到99%的时候,学校突然停电,资料全没了,哎呀!同事还在笑呵呵的说:sorry,我看昨晚这只在我桌子上拉稀的老鼠,估计它肠胃不太好,然后就碰到你的电源开关了!赶紧给我的板板上电,连上j-link,重复开始的步骤,坏了,AXD弹出个大叉叉ERROR:RDI severe Error 00602:Can't halt targe and make it ENTER debug mode。

网上问的人多,解答的人少,下面是专家解析:

The ARM can only respond to a debug request betweeninstructions (in the sameway that most ARM cores can only respond to an interrupt betweeninstructions).

If the bad boot loader that you have programmed in tries for example,toaccess non-existent memory and the memory controller does not signal anabort,then the core can never finish the instruction and therefore neverrespond tothe debug request.

To get the core to go into debug mode you need to get yourdebugger/ICE to dothe following (and this is only possible if nTRST and nSRST are trulyseparatesignals on your chip and board[1]);

assert the nSRST signal
assert the nTRST signal
release thenTRSTsignal - this resets the TAP controller
program a HW breakpoint at0x0
release the nSRST signal - this lets the core start running

The ARM will immediately hit the breakpoint at 0x0 (and stop) beforeit doesanything else. See sections 5.1.2 and 5.1.3 of the MultiICE user guidefor somemore on this topic.

What you do after this to program a new boot monitor depends on theboard/chip/debug tools but I guess you'll have to run some kind ofscript toinitialise RAM and program the FLASH??

[1]If nSRST and nTRST are joined then resetting the ARM (so that itstartsrunning at 0x0) will also reset the TAP controller and remove thebreakpoint at0x0.

我的板板的JTAGnTRST跟nRESET是通过一个0欧姆的电阻连接在一起,而且没有nSRST,专家说的方法不适合我,呜呜。。。不过他说的很精辟,
1)检查PLL,之前是否设置了错误的时钟频率,或者CPU进入了powerdown模式,但是我想powerdown模式是可以中断唤醒的啊。我用示波器看了下10M的OSC波形正常,PLL我也没设置过。
2)检查nWAIT信号,就是总线的等待信号,也正常。
3)检查flash是否有问题,比如badcode,导致取指异常。估计刚才擦除时掉电了,导致0x0地址指令异常!

找到问题所在,更让人傻眼了,JTAG接口如果不能haltthecpu,根本进入不了擦写或者编程flash,可是cpu一上电执行0x0的时候马上异常,来不及采取其他措施。所以通过JTAG接口操作的方案好像不行诶,我想拉低nWAIT让cpu等待,然后用JTAG来操作,但是JTAG的第一步就是nTRST让CPU复位,马上就进入异常了,试验还是失败了。
想到垃圾箱里面的一个HI_LOsystem的编程器,可以烧写flash,好不容易找齐了电源和USB线,才想到我的flash是焊在板上面的,怎么取下来还是个头疼的问题,在柜子里面找了几片AMIC的flash,1M X16bit,刚好是兼容的规格,就打算把板上面的给废了,换上一片AMIC的,TSOP0.5mm的间距也不是很难焊的嘛,关键时候,竟然找不到编程器的驱动,光盘早就扔了,上网兜了一圈,没找到!只好作罢。但愿这片flash是空白的,不要在0x0的位置给我搞一个bad code啊啊啊。
迫不及待的,匆匆忙忙的焊好这片flash,用酒精清洗,吹干。赶紧插上电源,^_^哈哈,可爱的三盏小灯拼命闪啊闪,蜂鸣器还一个劲的叫,嗯感觉有点怪,这灯异常!拔了电源看一下,妈呀!插了一个24v的电源!我桌子上有两个直流电源,一个5v,一个24v,我一激动插了24v的插头,两个还长的一模一样的啊
插回5v电源,电源指示正常,看了下LM1117的datasheet,极限电压20v,呵呵,危险啊。连上j-link,用rx 0试了一下,哈哈终于可以halt住cpu拉,烧了uboot进去,启动正常,测试下sram也正常。
准备收工时,感觉左手有东西很烫,赶紧拔电确认,是rtl8019发烧了,原理图上rtl8019是接5v电源的,估计刚才挂了~~~只好把它拆了。现在这块板板是缺胳膊少腿的拉,上图: