Can not flash new XMC1302 on custom board

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

cross mob
User15383
Level 1
Level 1
Hello, I am not able to flash my XMC1302 on my custom board, I'm getting "Could not connect to target. Please check power, connection and settings.". It works perfectly fine with the XMC1300 boot kit.

3189.attach

My setup:

- Software: DAVE 4.4.2 and J-Flash V6.32d , works fine with the boot kit with the same MCU and pin config.
- Hardware: SEGGER J-Link Lite-XMC4200 V1.00 (the J-Link board that comes with the boot kit). Firmware 2017 Apr 5.
- MCU: XMC1302T038X0200ABXUMA1.
- IC package: TSSOP-38.

What I have done to debug:

- Reviewed my design over and over with different methods. Everything from pins, footprints, connections etc.
- I have soldered the IC with different solder with different temperatures. In my last attempt I went with non-lead-free solder and 245 degrees C.
- I have checked every pin so that there's no short-circuits or open connections (except for the ones that should be there).
- I have "reverse-engineered" the boot kit to make sure that I use the exact same setup, connections, components etc. I looked in the schematics as well as checking with a multimeter.
- I haven't touched the IC with my hands and I'm very careful with handling it.
- I have 4 boards that should work but all of them have the same problem.
- I checked the documentation to see how the BMI headers are configured for new ICs and learned that the default setup is like the one in the boot kit.
- I have verified multiple times that the programmer has the correct connection to the debug (J4) header connector and that it is the same as for the boot kit.
- I have checked the voltage which is 3.3 V.
- The SWD (P0.14) pin gets pulled-up which means that the SSW is executing.

Boot kit:

https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc13_boot_001/

The design:

The design is just like the boot kit but with connections for sensors and some more stuff. I haven't soldered anything of that yet so the only connections that aren't left open is the power pins and programming pins.

3187.attach

3188.attach

Any ideas on how I could solve this or debug this further?
0 Likes
8 Replies
User15383
Level 1
Level 1
Update:

I treated the IC on the boot kit the same way as the new IC I soldered on my board:

- I removed the solder.
- I created bridges and then fixed them.
- I put on new solder.
- I cleaned it as usual.
- Repeated the above over and over again.

The result, it is still working properly, like before.

I also removed the IC from the boot kit completely and carefully soldered on my own. Now the boot kit has the same problem as my custom boards.

Conclusion:

The soldering and the design is not the problem. The problem is one of the below:

- The flashing needs to be done differently.
- The ICs are broken in some way.
0 Likes
User15383
Level 1
Level 1
Update:

I finally solved it by using the Memtool program provided by Infineon. Appearently, I got it completely wrong when it comes to which bootloader mode the IC gets delivered in. The IC needs to be flashed the first time using UART, and that's where Memtool comes in.
0 Likes
User17935
Level 1
Level 1
I am having the same problem, how did you solve this one? What do you mean by "The IC needs to be flashed the first time using UART, and that's where Memtool comes in" .
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

The XMC1 family devices come out of the factory in UART boot strap loader mode (ASC-BSL). You will need to change the BMI to SWD0 or SWD1 depending on the pins you have chosen.
Check https://www.infineon.com/dgdl/Infineon-ApplicationNote_XMC1000_Microcontroller_BootModeHandling-AN-v...

Regards,
Jesus
0 Likes
User17935
Level 1
Level 1
Regarding on changing the BMI, what hardware do I need to use. Can I change it using only the XMC1300 bootkit or do I need miniWiggler? I tried only using the XMC1300 bootkit connecting it on P0.15 and P0.14 and I also tried connection on P1.3 and P1.2 of XMC1300(Note: The pin I used on the custom board is P0.15 SWCLK and P0.14 SWD) with different setup on Infineon memtool but I can`t seem to establish a connection.
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Do you have installed latest JLink software?

Having connected SWD/SCLK from the debug probe, start JLink commander
SEGGER J-Link Commander V6.50a (Compiled Aug 26 2019 10:17:04)
DLL version V6.50a, compiled Aug 26 2019 10:16:19

Connecting to J-Link via USB...O.K.
Firmware: J-Link Lite-XMC4200 Rev.1 compiled Mar 1 2019 11:28:26
Hardware version: V1.00
S/N: 591123290
VTref=3.300V


Type "connect" to establish a target connection, '?' for help


Type getbmi. You should see

J-Link>getbmi
Current BMI mode: 0.


You can change the BMI using setbmi

J-Link>setbmi
Syntax: SetBMI
Valid values for :
0 ASC Bootstrap Load Mode (ASC_BSL)
1 User Mode (Productive)
2 User Mode (Debug) SWD0
3 User Mode (Debug) SWD1
4 User Mode (Debug) SPD0
5 User Mode (Debug) SPD1
6 User Mode (HAR) SWD0
7 User Mode (HAR) SWD1
8 User Mode (HAR) SPD0
9 User Mode (HAR) SPD1


In my case I change to SWD0, by setbmi 2
J-Link>setbmi 2
Setting BMI mode 2...O.K.
J-Link>


Regards,
Jesus
0 Likes
User15383
Level 1
Level 1
I find the Memtool hard to use and sometimes it just don't seem to work and I can't connect to the device.However, I also found out that it is possible to use DAVE to set the BMI headers much easier:

3772.attach

Set the new BMI to "User Mode (Debug) SWD0".

I haven't used anything else than the XMC1300 Bootkit so it should work. I have cut off the programmer from the rest of the board and I'm using the cable that came with the kit.

If that doesn't work you could try the following:


  • Try to flip the cable, it is designed to not destroy anything if inserted mirrored, and I think the markings may be wrong so don't rely on them.
  • Disconnect and connect the debugger to USB again to restart it.


And if it still won't work you could read my original messages for more debugging methods you could use.
0 Likes
User17935
Level 1
Level 1
My thought also, I think I need to cut the Detachable J-Link debugger from the XMC1300 boot kit so I can use it to program my custom board. So far I am using miniWiggler to program my custom board. I think I will try cutting it to try to program using DAVE IDE.
0 Likes