XMC4XXX MCU, prone to "corruption"

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
wsnfly
Level 2
Level 2
10 replies posted 25 sign-ins 5 questions asked

本人在使用XMC4800单片机开发设备时,出现过单片机被锁死的情况。并测试了其他几款XMC4300和xmc4500单片机,也会出现这种情况。

具体情况是这样的:
我用DAVE4软件进行pass和DEBUG
但是经过多次调试,发现进入debug后程序无法继续运行,没有运行按钮。提示“No source available for "0x0"”这个代码,不知是什么原因造成的。
电路设计没有问题。后来重新设计了板子,只接了电源和...

微信截图_20230327185137.png微信截图_20230327185412.png

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi, @wsnfly ,

    我们这边看过您的原理图之后没发现什么问题。实际上,在DAVE中烧写的时候偶尔也会出现' No source available' 的报错。您是通过这个部分来判断您的板子坏掉的吗?还是有其他的情况?

Owen_Su_0-1680059747716.png

    上图中的这个情况就表示您的代码已经正常运行了。能够进入到这个界面说明芯片已经被正常枚举,J-LINK能够识别。

    这边给您以下建议:

    1. 运行Easy start的程序,观察对应的LED灯是不是正常闪烁;

    2. 用DAVE生成.hex文件之后,用XMC Flasher来进行烧写。

Owen_Su_1-1680060019091.png

 

BR,

Owen

   

View solution in original post

0 Likes
13 Replies
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

您好,

    请问您测试的XMC都是自己开发设计的嘛?如果使用的是我们的KIT,这边建议您新建project的时候选择DAVE easy start,先看一下最基础的点灯代码能不能正常点灯。一般出现no resource的报错都是代码里出现了配置不正确的问题导致的。

    您可以New- Dave Easy start project- rebuild active project - debug:

Owen_Su_0-1679970141235.png

BR,

Owen

0 Likes
wsnfly
Level 2
Level 2
10 replies posted 25 sign-ins 5 questions asked

 

The same program, debugged on the kit board, can run normally without damaging the chip. But the same program is debugged on its own circuit board, and after a few hours or a few days, the chip will be broken. When I removed the broken chip to the KIT board, it was still broken. There is no doubt that my board damaged the chip. But I can't find what is corrupting it. There is no higher voltage, and it is powered by a computer USB. It's just a normal programming program through jlink. (I have been using XMC1302 for development, and there is a certain production quantity, xmc1302 has not encountered such failures)
I made 3 similar minimum systems, xmc4300-100, xmc4500-100, xmc4800-144, they all broke after I debugged for a while.

Here is my schematic, it is very simple, a few filter capacitors, a few resistors, a crystal oscillator and 1 ASM1117-3.3.
Debugging is using a 4-wire JLINK.

After clicking Pause, I found that the running address is 0X0000000 instead of 0X8000000. As shown in Figure 1

Then I wanted to check the program at 0x8000000 and found that it was all empty. as shown in picture 2

 

I'm hoping to find out why they're broken, it's because of a problem somewhere in my blueprints. Otherwise, I can't use this chip in mass production

Many thanks

QQ截图20211127192504.jpgQQ截图20211127192558.jpgQQ图片20230328165840.pngQQ图片20230328165854.png

0 Likes

To be honest, I do not have much experience with Infineon's XMC4xxx processors.
But I dealt quite a bit with other Cortex M4 MCUs.

> After clicking Pause, I found that the running address is 0X0000000 instead of 0X8000000. As shown in Figure 1

> Then I wanted to check the program at 0x8000000 and found that it was all empty. as shown in picture 2

I would check the datasheet/reference manual (or whatever Infineon calls it).
Basically all modern MCUs have boot pin(s) that determine the startup mode (run system bootloader, run Flash app, etc.). And some MCUs do map the Flash area to different addresses, depending on the boot mode.
Check that these pins are at a proper and stable level.

0 Likes
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

您好,

    您可以把完整的PCB文件分享一下嘛?按照目前的情况应该分步进行分析,一个模块一个模块的检查一下过流的部件是哪里。比如VDD是不是与GND击穿了,他们之间的电阻是不是很大等等。

    然后您报错的具体现象是在软件中体现的嘛?还是说具体某个pin不工作了?软件代码也可以分享一下。建议您跑一个空工程看看是不是会出错,就是跑一个simple main project。

BR,

Owen

0 Likes
lock attach
Attachments are accessible only for community members.
wsnfly
Level 2
Level 2
10 replies posted 25 sign-ins 5 questions asked

I'm sure it can't run even if it runs out of programs (the program is correct, because the original KIT board can run the program). I'm sure the chip is damaged, or locked up. Since I soldered it to the KIT board, it still doesn't work. If it's just a software problem, it won't be able to damage the chip. At least it still works when I write normal programs.
The following is the PCB board and empty program, unable to run

I click DEBUG to enter the debugging interface, the run button in the upper left corner is gray, but the pause button in the middle is on. Then after I clicked Pause, it stayed at the address of 0X0000E6.

QQ截图20230328180829.pngQQ截图20230328180911.png

 

0 Likes
lock attach
Attachments are accessible only for community members.
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi, @wsnfly ,

    我们这边看过您的原理图之后没发现什么问题。实际上,在DAVE中烧写的时候偶尔也会出现' No source available' 的报错。您是通过这个部分来判断您的板子坏掉的吗?还是有其他的情况?

Owen_Su_0-1680059747716.png

    上图中的这个情况就表示您的代码已经正常运行了。能够进入到这个界面说明芯片已经被正常枚举,J-LINK能够识别。

    这边给您以下建议:

    1. 运行Easy start的程序,观察对应的LED灯是不是正常闪烁;

    2. 用DAVE生成.hex文件之后,用XMC Flasher来进行烧写。

Owen_Su_1-1680060019091.png

 

BR,

Owen

   

0 Likes
wsnfly
Level 2
Level 2
10 replies posted 25 sign-ins 5 questions asked

Thank you so much. Finally, I disassembled the debugging part of KIT_XMC45, and then used XMCFLASH to erase the chip and it can be used normally again. But the reason for this problem is not known. It may be that the connection line of JLINK is too long, resulting in the wrong program being written

QQ截图20230414130123.png

0 Likes
zzz_3221081
Level 5
Level 5
100 sign-ins 10 likes received First like given

I believe you are talking about a custom board.
To be honest, the soldering of the boards in the photo does not look good.
Far too much solder on smaller components, and MCU pins seem shorted.

I would check the hardware carefully.

I used a web-based translator for this post.

0 Likes

I admit that the circuit board on the left is really ugly:), because I didn't clean the flux, but the pins are indeed not short-circuited. I soldered and tested similar boards, namely XMC4300-F100, XMC4500-F100, XMC4800-F144. They This corruption occurs after hours or days of debugging. i'm looking for the reason

0 Likes
zzz_3221081
Level 5
Level 5
100 sign-ins 10 likes received First like given

Now that is ok. Prototype boards often do not look so nice.
But checking them carefully before powering up is a necessity, as I learned.

> They This corruption occurs after hours or days of debugging. i'm looking for the reason

Assuming you have a stable firmware, such runtime problems are often caused by either clock instabilities or power supply issues.  The latter could be cause by insufficent buffer capacities, or suboptimal placement of buffer caps.
Occasionally, thermal issues issues can produce runtime faults.
Either the Flash access times / waitstates become insufficient, or increased power consumption causes a power suuply drop-out / brown-out.

Perhaps you could try to reduce the core clock frequency. and cool/heat the board. If the incidence frequency drops or increases, you are one step further.

Just observations I picked up from projects I was involved in, I am a software guy.

0 Likes

You are right, the unstable power supply, including the clock frequency, will make the operation unstable. As for the temperature, the chip is not connected to any external devices, and the temperature should not be too high during normal operation. The software part uses an empty program generated by DAVE, which is also broken. In the end, I can only suspect that something is wrong with my PCB design.

I have uploaded the PCB and debug program, if you have time or interest, you can take a look. Thank you for your help

0 Likes

> The software part uses an empty program generated by DAVE, which is also broken.

I can't really help you with that, I don't have a XMC4xxx board at all, nor a DAVE installation.

> In the end, I can only suspect that something is wrong with my PCB design.

What you can try - I am sure the XMC4xxx MCU has a system/ROM bootloader as well.
Boot the board into this ROM-BL mode, and try a Flash mass-erase.
Usually, one needs a manufacturer-specific tool that implements the MCU's ROM boot protocol(s).

I have done this successfully for ST's STM32 and NXP's LPC17xx MCUs, both also Cortex M.
The procedure and required tools should be described in some MCU manuals.

0 Likes

ok thanks.
It is true that I use STM32 in most cases, and I have never encountered such a chip failure.

 

0 Likes