大家好,经过多年的微控制器,我第一次遇到这个错误,我花了半个下午试图摆脱它,但没有成功。我的情况如下:我在一个新的板上有AdSPIC3FJ64 GS606,它被ICD3正确识别,我使用PGC/PG。D3端口(正确设置在MPLAB 8.88 -是的,我仍然使用旧版本,我不理解任何在新的……)如果我使用ICD3作为程序员,一切工作良好的所有振荡器配置(内部,XT,有或没有PLL……)。当我使用它作为调试器时,程序被写入,验证,但是我得到0040错误。我已经检查了微控制器的安装,它看起来很好,程序员引脚似乎是正确的引脚上的连接器,复位只有一个100K上拉,它是直接连接到TH。
电路板几乎完全无人居住(只有SPI总线上的ADC和M3322收发器,我不认为它们能在这一点上干扰),我已经尝试过任何可能的保险丝设置组合,但结果总是一样的。当编程和执行速度根据振荡器设置改变时,我倾向于排除振荡器或板本身的硬件问题。IC PIS与ICD连接器之间的电阻是0.4OHM,所以我也排除了焊接的一些问题,ICD电缆是标准的短路,作为USB电缆。连接器只放置在离微控制器几毫米的地方,所以轨道很短。程序还没有做任何事情,只是将一个端口设置为输出并闪亮LED,因为我把所有的东西都移除了,以确保那里没有干扰。我明天唯一能做的就是组装一个第二个
PCB,测试一个只排除一个微控制器故障,所以任何建议都是非常欢迎的。谢谢!吉安保罗
以上来自于百度翻译
以下为原文
Hi all,
after many years of microcontrollers I have encountered for the first
time this error and I have spent half afternoon trying to get rid of it, but without success.
My situation is as follows:
I have a dsPIC33FJ64GS606 on a new board, it is correctly identified by the ICD3, I am using the PGC/PGD3 port (correctly set in MPLAB 8.88 -yes, I am still using the old version, I do not understand anything in the new one...).
If I use the ICD3 as a programmer, everything works fine with all oscillator configuration (internal, XT, with or without PLL...). When I use it as a debugger, the program gets written, verified, but I get the 0040 error.
I have checked the mounting of the microcontroller and it seems fine, the programmer pins seems to be going to the correct pins on the connector, the reset has only a 100k pullup and it is wired directly to the ICD connector.
The PCB is almost completely unpopulated (only an ADC on the SPI bus and a MAX3232 transceiver, I don't think they can interfere at this point), I have tried any possible combination of fuse settings I could think of, but the result is always the same.
Since the microcontroller works when programmed and the execution speed changes according to the oscillator setup, I tend to exclude an hardware issue with the oscillator or with the board itself. The resistance between the IC pis and the ICD connector is 0.4Ohm, so I would also exclude some problem with soldering, the ICD cable is the standard short one, as the USB cable. The connector is placed only a few millimeters away from the microcontroller, so tracks are very short.
The program is not doing anything yet, just setting one port as output and flashing a led, since I removed everything to be sure that there were no interference from there.
I am quite out of ideas, the only thing I can try tomorrow is to assembly a second PCB and test that one just to exclude a microcontroller failure, so any suggestion is very welcome.
Thanks!
Gian Paolo