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

XMC™ Forum Discussions

User17850
Level 1
Level 1
Hi all,
I'm new on Infineon, I've a XMC1202x016 it's possible to flash/debug it with the ulink2 programmer via SWD programming?
Thanks.
0 Likes
12 Replies
jferreira
Employee
Employee
First like received 750 replies posted 500 replies posted
Hi,

Yes it is possible.

Regards,
Jesus
0 Likes
User17850
Level 1
Level 1
Thanks for reply, I'm using this configuration but the ulink2 doesn't recognize any Cortex.. What's wrong?
Thanks.3727.attach
0 Likes
jferreira
Employee
Employee
First like received 750 replies posted 500 replies posted
Hi,

Did you switched the BMI from ASC_BSL to SWD0?

Regards,
Jesus
0 Likes
User17850
Level 1
Level 1
Thanks for reply,
I'm new on this uC I'm studying all the datasheet, I'll try your suggest.

Regards,
Lorenzo.
0 Likes
User17850
Level 1
Level 1
Hi,
now I'm trying to change the BMI, I'm using an USB to UART converter and I've downloaded the MemTool software but it cannot communicate with the XMC.. I'm doing something wrong?
Thanks.
0 Likes
jferreira
Employee
Employee
First like received 750 replies posted 500 replies posted
Hi,

Can you send an oscilloscope picture of the communication between your USB to UART converter and the XMC1200?
The connection sequence is specified in 23.1.2.2 ASC BSL download sequence, see Figure 23-1 Baud Rate configuration sequence during XMC1200 ASC BSL entry

Regards,
Jesus
0 Likes
User17850
Level 1
Level 1
Ok, now I see if I can do that.
Need by chance of an external signal? e.g. pin low at power on?
0 Likes
User17850
Level 1
Level 1
I'm not able to trace it via oscilloscope sorry.. Any other idea? this thing is really frustrating.
Thanks
0 Likes
jferreira
Employee
Employee
First like received 750 replies posted 500 replies posted
Hi,

Normally the connection works out of the box.
Can you verify that you followed the steps in the following figures for configuring the ASC interface?
4031.attach
4032.attach
4033.attach

You can try to enable the logging (Log > Show Log).

The power applied to the device is compatible with the levels of the USB to UART device?
Your connection to the device should look like the following (for the case of 5V)

4034.attach

Regards,
Jesus
0 Likes
User17850
Level 1
Level 1
Thanks for reply!
I follow all your step.. but nothing I'm not able to change this BMI. The file attached is the J-link commander sequence, it seems that it see the XMC but not able to connect with it, if I write the command getBMI it gives me the error -262.
0 Likes
User17850
Level 1
Level 1
Ok. Now I'm using J-Mem and I can see the FLASH! at the address 10000E00 is flashed F8C3 so I think that is correct! but in keil when I try to flash it gives me this text:
JLink info:
------------
DLL: V6.32i, compiled Jul 24 2018 15:19:55
Firmware: J-Link V11 compiled Jan 7 2020 16:52:13
Hardware: V11.00
Feature(s) : FlashBP, GDB

* JLink Info: Performing XMC1000 connection sequence.
* JLink Info: Trying to identify target via SPD
* JLink Info: Could not identify target via SPD. Trying again via SWD.
* JLink Info: Found SW-DP with ID 0x0BB11477
* JLink Info: Scanning AP map to find all available APs
* JLink Info: AP[1]: Stopped AP scan as end of AP map has been reached
* JLink Info: AP[0]: AHB-AP (IDR: 0x04770021)
* JLink Info: Iterating through AP map to find AHB-AP to use
* JLink Info: AP[0]: Core found
* JLink Info: AP[0]: AHB-AP ROM base: 0xF0000000
* JLink Info: CPUID register: 0x410CC200. Implementer code: 0x41 (ARM)
* JLink Info: Found Cortex-M0 r0p0, Little endian.
* JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
* JLink Info: CoreSight components:
* JLink Info: ROMTbl[0] @ F0000000
* JLink Info: ROMTbl[0][0]: E00FF000, CID: B105100D, PID: 000BB471 ROM Table
* JLink Info: ROMTbl[1] @ E00FF000
* JLink Info: ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
* JLink Info: ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
* JLink Info: ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
ROMTableAddr = 0xF0000000
* JLink Info: Performing XMC1000 reset

Target info:
------------
Device: XMC1202-T028x0016
VTarget = 4.492V
State of Pins:
TCK: 0, TDI: 0, TDO: 0, TMS: 1, TRES: 1, TRST: 0
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints: 2
JTAG speed: 1000 kHz

Full Chip Erase Failed!
Error: Flash Download failed - "Cortex-M0"

Any idea? Thanks.
0 Likes
jferreira
Employee
Employee
First like received 750 replies posted 500 replies posted
Hi,

The BMI is correct. Can you try by upgrading the JLink software?

If I try the same I get the following (using latest JLink software)

Load "C:\\Files\\Projects\\MDK\\XMC1400_Test_JLINK\\Objects\\XMC1400_Test_JLINK.axf" 
Set JLink Project File to "C:\Files\Projects\MDK\XMC1400_Test_JLINK\JLinkSettings.ini"
* JLink Info: Device "XMC1404-0200" selected.

JLink info:
------------
DLL: V6.62d, compiled Mar 2 2020 09:22:41
Firmware: J-Link Lite-XMC4200 Rev.1 compiled Mar 1 2019 11:28:26
Hardware: V1.00
S/N : 591046198

* JLink Info: Trying to identify target via SPD
* JLink Info: Could not identify target via SPD. Trying again via SWD.
* JLink Info: Found SW-DP with ID 0x0BB11477
* JLink Info: Unknown DP version. Assuming DPv0
* JLink Info: Scanning AP map to find all available APs
* JLink Info: AP[1]: Stopped AP scan as end of AP map has been reached
* JLink Info: AP[0]: AHB-AP (IDR: 0x04770021)
* JLink Info: Iterating through AP map to find AHB-AP to use
* JLink Info: AP[0]: Core found
* JLink Info: AP[0]: AHB-AP ROM base: 0xF0000000
* JLink Info: CPUID register: 0x410CC200. Implementer code: 0x41 (ARM)
* JLink Info: Found Cortex-M0 r0p0, Little endian.
* JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
* JLink Info: CoreSight components:
* JLink Info: ROMTbl[0] @ F0000000
* JLink Info: ROMTbl[0][0]: E00FF000, CID: B105100D, PID: 000BB471 ROM Table
* JLink Info: ROMTbl[1] @ E00FF000
* JLink Info: ROMTbl[1][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
* JLink Info: ROMTbl[1][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
* JLink Info: ROMTbl[1][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
ROMTableAddr = 0xF0000000
* JLink Info: Performing XMC1000 reset

Target info:
------------
Device: XMC1404-Q064x0200
VTarget = 3.300V
State of Pins:
TCK: 0, TDI: 0, TDO: 0, TMS: 16, TRES: 0, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints: 2
JTAG speed: 3000 kHz

Erase Done.
Programming Done.
Verify OK.
Flash Load finished at 15:19:02



These are my debug settings
4080.attach

Regards,
Jesus
0 Likes