XMC1400: Cannot enter in debug mode via SWD

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

cross mob
Not applicable
Hi,

I'm working on the programming algorithm for the XMC1402-0064 device. Unfortunately I cannot communicate with the device via SWD.
The connection sequence used is the same for the Cortex device ( STM32, NXP etc) and also described in the "XMC1400 AA-Step XMC1000 Family Reference Manual with 50 clock cycles data = 1s. However, I'm not able to read the SW_DP IDCODE.
When I tried with J-Link, I got this:


2860.attach


After that, I tried again with my tool and it works successfully, even after POR. I can read the IDCODE and perform all the SWD commands.
It seems that the J-Link sends a special sequence to enable the SWD protocol.

Is there a special command (maybe via SPD) to send before starting the connection sequence?


Thanks in advance

Best regards,

Luca
0 Likes
3 Replies
User12775
Level 5
Level 5
First solution authored First like received
Is it a new XMC1400 chip?

If yes, then you should modify the BMI before you could use the SWD interface. New XMC1x devices are configured as ASC interface, bizzarelly.
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Once you have connected with JLink commander, get the BMI value by typing:
J-Link>GetBMI
Current BMI mode: 2.


where the mode represents:
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

Which mode do yout get?
If you want to set the BMI mode to SWD0 (P0.14/P0.15), just use JLink command, SetBMI 2

Regards,
Jesus
0 Likes
Not applicable
Thank you so much for your replies.

I tried to connect via ASC_BSL and it works! After sending "0x00 0x6C" it answers 0x5D.

Again, thank you for your support!

Now, if I want to change the BMI via UART, I have to download the flash loader and then send the "execute ‘Change BMI’ routine" command. Am I right?
Is it correct the syntax command described in the AP32277 - ASC Bootstrap loader for XMC1000 document p.18?

2863.attach
0 Likes