XMC1400 Problems changing BMI from UART to SWD

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

cross mob
User15169
Level 1
Level 1
Hi Infineon Forum,

my problem is similar to " XMC1100 Problems changing BMI from UART to SWD"
I develop new device with XMC1202Q24X0032ABXUMA1 and XMC1402Q040X0032AAXUMA1.(The Samples I get in mai and june.)


My Problem Is to get connection to the XMC1402 with SWD0, after I switched BMI ASC_BSL 0xFFC0 to User Mode(HAR) SWD0 0xF8C7
with Segger J-Link Commander to Mode 2, connetction to XMC is lost.

I tried J-Link Commander again, but get only ErrorCode: -262

With Memtool 4.7 (and COMXX: Jlink CDC UART Port) I get "Can´t connect to Target"

With Hterm I tried with COMxx After I send 0x00 and 0x6C, I don´t get 0x5D

Here a picture from J-Link Commander

3183.attach
0 Likes
14 Replies
DRubeša
Employee
Employee
First solution authored First like received
Hi,

what is see from your snapshot of J-Link Commander is that you´re not connect to target interface:
3184.attach

So, do the "connect" first, and then try to change the BMI mode.

Regards,
Deni
0 Likes
User15169
Level 1
Level 1
Ok, the I get this3185.attach
0 Likes
User15169
Level 1
Level 1
Hi Deni,

do you have solution for me.
I have already done update of J-Link.
But its show still the same message: Firmware is too old.
Regards
Michael
0 Likes
User10239
Level 1
Level 1
Welcome! 10 replies posted 5 replies posted
Hi. I had same Problems- I couldn't program the debug Option at a brandnew XMC1302 µC via BMI. The Problem was an updated SEGGER-Jlink. My Workaround: Install DAVEV4.3.2 again with delivered SEGGER Jlink - just then I was able to program.
0 Likes
DRubeša
Employee
Employee
First solution authored First like received
Hi Michael,

try updating the firmware of a J-Link debugger...open J-Link Configurator and try to force the Update Firmware by right-clicking on the detected emulator. Then once the newest firmware is flashed, try again connect to your target device. However, even if the firmware is old, this connect should pass...try maybe to change the usb port where the debugger is connect.

And yes, have you tried approach that another forum member has been suggesting; to use the DAVE and try to connect with it?

Regards,
Deni
0 Likes
User15169
Level 1
Level 1
Hi Deni and Haselberger,

thank you for the answer.

- USB to change is without effect,

-Update of J-Link:
SEGGER J-Link Configuration V6.32g
Updating firmware of emulator 1 of 1 via USB (SN: 591044167)... Not updated, emulator firmware is already up to date.

How I can change BMI with DAVE?
I am working with Kile uVision.

Regards
Michael
0 Likes
DRubeša
Employee
Employee
First solution authored First like received
Hi Michael,

than let´s check some other things...due to the fact you´re using your own board to which pins have you connected debugger?

Regards,
Deni
0 Likes
User15169
Level 1
Level 1
Hi Deni,

My device has two microcontroller XMC1202Q24X0032ABXUMA1 and XMC1402Q040X0032AAXUMA1.

Communication with XMC1202 is ok.(switching of BMI with Memtool, XMCFlasher)

Communication with XMC1402 is not ok.
So I took another new board and start first with HTerm with COM6.(19200,Data:8/Stop:1/Parity:none)
According to "Infineon-TOO_XMC1000_Boot_Modes-AN-v01_03-EN" page 7 Figur2
I send 0x00 0x6C and get BSL_ID 0x5D. That mean pins are correct connected.
Device OFF/ON.
Then I start Memtool with default config "XMC1400 Boot Kit with XMC1404-Q064X0200 with on-board debugger (Minmon/ASC via VCOM)"
And tried to connect with COM6 19200.

We 11.07.2018 08:47:16.790, Message, IMTMemtool, ConnectTarget
We 11.07.2018 08:47:16.790, Message, MiniMonTargIntf, Connect(5)
We 11.07.2018 08:47:16.791, Message, MiniMonTargIntf, Using default Monitor Image 'CortexM.Asc.XMC1400.Def'
We 11.07.2018 08:47:16.791, Message, MiniMonTargIntf, Try to open port COM6 ...
We 11.07.2018 08:47:16.791, Message, MiniMonTargIntf, Port COM6 opened, 19200 Baud, K-Line: no
We 11.07.2018 08:47:17.007, Error, MiniMonTargIntf, Bootstrap loader not responding !
We 11.07.2018 08:47:17.007, Error, MiniMonTargIntf, Please check:
We 11.07.2018 08:47:17.007, Error, MiniMonTargIntf, - Target power supply
We 11.07.2018 08:47:17.007, Error, MiniMonTargIntf, - Communication cable
We 11.07.2018 08:47:17.007, Error, MiniMonTargIntf, - Communication settings
We 11.07.2018 08:47:17.007, Error, MiniMonTargIntf, Start monitor failed
We 11.07.2018 08:47:17.007, Error, MiniMonTargIntf, Can't connect target !
We 11.07.2018 08:47:17.009, Message, MiniMonTargIntf, Connection failed report created: C:\Users\M\Documents\Infineon\IMT 4.7\Log\__connection_failed_report__Controller0_CORTEX_2018_07_11.txt
We 11.07.2018 08:47:17.009, Message, MiniMonTargIntf, Connect, Result: 0x80004005, Time: 219, State: unknown
We 11.07.2018 08:47:17.009, Error, IMTMemtool, Can't connect to Target

Then :Device OFF/ON
AND again starts HTerm, send 0x00 0x6C no answer, send 0x00 0x6C and amswer is BSL_NOK 0x02. WHY?
0 Likes
User15169
Level 1
Level 1
Then: I Diconnected J-Link from USB and connect again.
Try again Memtool and get connectio to XMC1402.
Then I chanege BMI with default config for XMC1404

We 11.07.2018 09:05:25.535, Message, IMTMemtool, Init(), Version 1.34.2
We 11.07.2018 09:05:25.535, Message, IMTMemtool, Init
We 11.07.2018 09:05:25.538, Message, IMTTargInfo, Init(), Version 1.21.0
We 11.07.2018 09:05:25.538, Message, IMTTargInfo, Using TypesInfo C:\Program Files (x86)\Infineon\Memtool 4.7\Types_IMT.dat, V2,12,04,4714
We 11.07.2018 09:05:25.538, Message, IMTTargInfo, Init, Result: 0x00000000, Time: 0
We 11.07.2018 09:05:25.538, Message, IMTMemtool, UDETargInfo loaded: IMT Target Information Handler V1.21.0
We 11.07.2018 09:05:25.539, Message, IMTTargInfo, Master CoreInfo CORTEX created
We 11.07.2018 09:05:25.539, Message, IMTTargInfo, MemDevInfo(int) PFLASH created
We 11.07.2018 09:05:25.539, Message, IMTTargInfo, MemDevInfo(int) SRAM created
We 11.07.2018 09:05:25.539, Message, IMTTargInfo, MemDevInfo(int) BOOTROM created
We 11.07.2018 09:05:25.540, Message, IMTTargInfo, McuInfo Controller0 created
We 11.07.2018 09:05:25.540, Message, IMTMemtool, CFG-File C:\Users\Michael.Schlothauer\Documents\Infineon\IMT 4.7\Targets\xmc1400_bootkit_xmc1404_minimon_asc2.cfg loaded
We 11.07.2018 09:05:25.540, Message, IMTMemtool, CFG-File C:\Users\Michael.Schlothauer\Documents\Infineon\IMT 4.7\Targets\xmc1400_bootkit_xmc1404_minimon_asc2.cfg used as UDE storage
We 11.07.2018 09:05:25.540, Message, IMTMemtool, Use Driver Library C:\Program Files (x86)\Infineon\Memtool 4.7\FlashDrv_IMT.dat, V2,10,1,4714
We 11.07.2018 09:05:25.540, Message, IMTMemtool, Core 'CORTEX' used for FLASH programming
We 11.07.2018 09:05:25.541, Message, IMTMemtool, Create TargIntf
We 11.07.2018 09:05:25.544, Message, MiniMonTargIntf, Init(), Version 1.15.3
We 11.07.2018 09:05:25.544, Message, MiniMonTargIntf, Private info 'MiniMonTargIntf' used as Target Profile
We 11.07.2018 09:05:25.544, Message, MiniMonTargIntf, Outer-Init(), Version 1.8.0
We 11.07.2018 09:05:25.549, Message, MiniMonTargIntf, Memory filter list - installed filters:
We 11.07.2018 09:05:25.549, Message, MiniMonTargIntf, Memory filter: ID: 2h, Level: 99, Mode: 1, Name: PFLASH
We 11.07.2018 09:05:25.549, Message, MiniMonTargIntf, Range: 0x10001000-0x10032FFF
We 11.07.2018 09:05:25.549, Message, MiniMonTargIntf, Memory filter: ID: 1h, Level: 100, Mode: 3, Name: Standard
We 11.07.2018 09:05:25.549, Message, MiniMonTargIntf, Range: 0x00000000-0xFFFFFFFF
We 11.07.2018 09:05:25.549, Message, MiniMonTargIntf, Memory filter list - write ranges:
We 11.07.2018 09:05:25.549, Message, MiniMonTargIntf, Memory filter range: 0x00000000-0x10000FFF --> filter ID: 0x0001, Name: Standard
We 11.07.2018 09:05:25.549, Message, MiniMonTargIntf, Memory filter range: 0x10001000-0x10032FFF --> filter ID: 0x0002, Name: PFLASH
We 11.07.2018 09:05:25.549, Message, MiniMonTargIntf, Memory filter range: 0x10033000-0xFFFFFFFF --> filter ID: 0x0001, Name: Standard
We 11.07.2018 09:05:25.549, Message, MiniMonTargIntf, Memory filter list - read ranges:
We 11.07.2018 09:05:25.549, Message, MiniMonTargIntf, Memory filter range: 0x00000000-0xFFFFFFFF --> filter ID: 0x0001, Name: Standard
We 11.07.2018 09:05:25.549, Message, MiniMonTargIntf, Init, Result: 0x00000000, Time: 16
We 11.07.2018 09:05:25.550, Message, IMTMemtool, Create FlashMod PFLASH object
We 11.07.2018 09:05:25.550, Message, CORTEX.PFLASH, Init
We 11.07.2018 09:05:25.560, Message, IMTMemtool, Init, Result: 0x00000000, Time: 16
We 11.07.2018 09:05:25.580, Message, IMTMemtool, ConnectTarget
We 11.07.2018 09:05:25.580, Message, MiniMonTargIntf, Connect(5)
We 11.07.2018 09:05:25.585, Message, MiniMonTargIntf, Using default Monitor Image 'CortexM.Asc.XMC1400.Def'
We 11.07.2018 09:05:25.585, Message, MiniMonTargIntf, Try to open port COM6 ...
We 11.07.2018 09:05:25.586, Message, MiniMonTargIntf, Port COM6 opened, 19200 Baud, K-Line: no
We 11.07.2018 09:05:25.812, Message, MiniMonTargIntf, Send monitor section: 0x20000200-0x20000783
We 11.07.2018 09:05:26.556, Message, MiniMonTargIntf, Target booted and connected
We 11.07.2018 09:05:26.562, Success, MiniMonTargIntf, Connected to PLS mini monitor v0.2.2
We 11.07.2018 09:05:26.562, Message, MiniMonTargIntf, Connect, Result: 0x00000000, Time: 984, State: halted
We 11.07.2018 09:05:26.566, Message, CORTEX.PFLASH, Using builtin default driver
We 11.07.2018 09:05:26.567, Message, CORTEX.PFLASH, Using driver Intern.XMC1000.PFLASH.Def, Version: 0.3.0
We 11.07.2018 09:05:26.568, Message, CORTEX.PFLASH, Using default value from driver for entry 'DrvStart'
We 11.07.2018 09:05:26.568, Message, CORTEX.PFLASH, Using default value from driver for entry 'DrvExecAddr'
We 11.07.2018 09:05:26.568, Message, CORTEX.PFLASH, Using default value from driver for entry 'TrBufSize'
We 11.07.2018 09:05:26.568, Message, CORTEX.PFLASH, Using default value from driver for entry 'TrBufStart'
We 11.07.2018 09:05:26.569, Message, CORTEX.PFLASH, Download driver section 0x20001000-0x2000169F
We 11.07.2018 09:05:26.569, Message, MiniMonTargIntf, WriteBlock(Mode: 0x40000001, Start: 0x20001000, Bytes: 1696 (0x000006A0))
We 11.07.2018 09:05:27.459, Message, MiniMonTargIntf, WriteBlock, Result: 0x00000000, Time: 891, State: 0x00000000
We 11.07.2018 09:05:27.459, Message, MiniMonTargIntf, ReadBlock(Mode: 0x40000001, Start: 0x20001000, Bytes: 1696 (0x000006A0))
We 11.07.2018 09:05:27.459, Message, MiniMonTargIntf, CCortexMRs232MiniMonTargetPort::ReadBlock(0x20001000-0x2000169F) ...
We 11.07.2018 09:05:28.374, Message, MiniMonTargIntf, ReadBlock, Result: 0x00000000, Time: 922, State: 0x00000000
We 11.07.2018 09:05:28.375, Message, CORTEX.PFLASH, ExecMonExt: 0000,1000,FA00,000F,0040,0000,0000,80FF, Timeout: 5000 ms
We 11.07.2018 09:05:28.375, Message, MiniMonTargIntf, ExecMonExt(Start: 0x20001000, Bytes: 16 (0x10), Timeout: 5000)
We 11.07.2018 09:05:28.399, Message, MiniMonTargIntf, ExecMonExt, Result: 0x00000000, Time: 15, State: halted
We 11.07.2018 09:05:28.399, Message, CORTEX.PFLASH, MonExtResult: 0400,2000,2000,FFFF,0456,0000,0000,0000, Time: 15 ms
We 11.07.2018 09:05:28.399, Message, CORTEX.PFLASH, TrBuf: 0x20002000-0x200023FF, FillByte: 0xFF, BurstSize: 256 (0x100)
We 11.07.2018 09:05:28.399, Message, CORTEX.PFLASH, Protection is installed
We 11.07.2018 09:05:28.399, Message, MiniMonTargIntf, ReadMem(Mode: 0x00000002, Addr: 0x10000E00)
We 11.07.2018 09:05:28.406, Message, MiniMonTargIntf, ReadMem, Result: 0x00000000, Time: 16, State: 0x00000000, Value: 0x0000FFC0
We 11.07.2018 09:05:28.410, Message, IMTMemtool, BMI configuration: 0xFFC0
We 11.07.2018 09:05:28.410, Message, CORTEX.PFLASH, Run time remap flag found in user setup
We 11.07.2018 09:05:28.410, Message, CORTEX.PFLASH, Install write filter 0x10001000-0x10032FFF
We 11.07.2018 09:05:28.410, Message, CORTEX.PFLASH, Install read filter 0x10001000-0x10032FFF
We 11.07.2018 09:05:28.410, Success, IMTMemtool, FLASH programming for device '200 kByte OnChip Program FLASH' ready
We 11.07.2018 09:05:28.410, Message, MiniMonTargIntf, GetTargetVersion()
We 11.07.2018 09:05:28.410, Message, MiniMonTargIntf, GetTargetVersion, Result: 0x00000000, Time: 0, State: halted, Version: CortexMx-Minimonitor
We 11.07.2018 09:05:28.410, Success, IMTMemtool, Connected to CortexMx-Minimonitor
We 11.07.2018 09:05:59.721, Message, MiniMonTargIntf, ReadMem(Mode: 0x00000002, Addr: 0x10000E00)
We 11.07.2018 09:05:59.727, Message, MiniMonTargIntf, ReadMem, Result: 0x00000000, Time: 0, State: 0x00000000, Value: 0x0000FFC0
We 11.07.2018 09:06:22.060, Message, CORTEX.PFLASH, Download driver section 0x20001000-0x2000169F
We 11.07.2018 09:06:22.060, Message, MiniMonTargIntf, WriteBlock(Mode: 0x40000001, Start: 0x20001000, Bytes: 1696 (0x000006A0))
We 11.07.2018 09:06:22.948, Message, MiniMonTargIntf, WriteBlock, Result: 0x00000000, Time: 890, State: 0x00000000
We 11.07.2018 09:06:22.948, Message, MiniMonTargIntf, ReadBlock(Mode: 0x40000001, Start: 0x20001000, Bytes: 1696 (0x000006A0))
We 11.07.2018 09:06:22.948, Message, MiniMonTargIntf, CCortexMRs232MiniMonTargetPort::ReadBlock(0x20001000-0x2000169F) ...
We 11.07.2018 09:06:23.864, Message, MiniMonTargIntf, ReadBlock, Result: 0x00000000, Time: 922, State: 0x00000000
We 11.07.2018 09:06:23.864, Message, CORTEX.PFLASH, ExecMonExt: 0000,1000,FA00,000F,0040,0000,0000,80FF, Timeout: 5000 ms
We 11.07.2018 09:06:23.864, Message, MiniMonTargIntf, ExecMonExt(Start: 0x20001000, Bytes: 16 (0x10), Timeout: 5000)
We 11.07.2018 09:06:23.888, Message, MiniMonTargIntf, ExecMonExt, Result: 0x00000000, Time: 16, State: halted
We 11.07.2018 09:06:23.888, Message, CORTEX.PFLASH, MonExtResult: 0400,2000,2000,FFFF,0456,0000,0000,0000, Time: 16 ms
We 11.07.2018 09:06:23.888, Message, CORTEX.PFLASH, Protection is installed
We 11.07.2018 09:06:23.888, Message, MiniMonTargIntf, WriteBlock(Mode: 0x40000001, Start: 0x20002000, Bytes: 4 (0x00000004))
We 11.07.2018 09:06:23.896, Message, MiniMonTargIntf, WriteBlock, Result: 0x00000000, Time: 15, State: 0x00000000
We 11.07.2018 09:06:23.896, Message, MiniMonTargIntf, ReadBlock(Mode: 0x40000001, Start: 0x20002000, Bytes: 4 (0x00000004))
We 11.07.2018 09:06:23.896, Message, MiniMonTargIntf, CCortexMRs232MiniMonTargetPort::ReadBlock(0x20002000-0x20002003) ...
We 11.07.2018 09:06:23.905, Message, MiniMonTargIntf, ReadBlock, Result: 0x00000000, Time: 0, State: 0x00000000
We 11.07.2018 09:06:23.905, Message, CORTEX.PFLASH, ExecMonExt: 000C,1000,0001,0000,0000,2000,2000,80FF, Timeout: 5000 ms
We 11.07.2018 09:06:23.905, Message, MiniMonTargIntf, ExecMonExt(Start: 0x20001000, Bytes: 16 (0x10), Timeout: 10)
We 11.07.2018 09:06:24.050, Message, MiniMonTargIntf, ExecMonExt, Result: 0x00000001, Time: 157, State: halted
We 11.07.2018 09:06:24.061, Message, MiniMonTargIntf, GetMonExtResult(Bytes: 16, Timeout: 0)
0 Likes
User15169
Level 1
Level 1
Log file is quite long and forum block it.
The moderator has to check it.

But:
We 11.07.2018 09:06:29.124, Message, IMTMemtool, BMI installed successfully

But After power off/on I don´t get connection with J-Link Commander(J-Link SWD/SCL)/ Memtool or Hterm(PC_RXD/PC_TXD)

Do you know why?
And what is different between XMC AB and AA devices?

Regards
Michael
0 Likes
User15169
Level 1
Level 1
I have checked my steps to switch BMI with XMC1300 and XMC1400 BooT Kits, and it is OK.
0 Likes
User15169
Level 1
Level 1
Hi Deni or somebody by infineon,

do you have solution for my problem with XMC1402 to switch BMI?
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Which pins do you use in the XMC14 as SWD clock and data?

Regards,
Jesus
0 Likes
User15169
Level 1
Level 1
I found solution for this problem.
After I changed BMI with Infineon Memtool 4.7, I connect Keil Ulink2 to the XMC1402 and get connection.
And after this I connect J-Link Lite and also get connection.
0 Likes