infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

Dave

+ Reply to Thread
Results 1 to 4 of 4

Thread: XMC1400: Cannot enter in debug mode via SWD

  1. #1
    New Member New Member Zanuttini is on a distinguished road
    Join Date
    Oct 2017
    Posts
    2
    Points
    35

    XMC1400: Cannot enter in debug mode via SWD

    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:


    Click image for larger version

Name:	Segger_XMC1402-0064_SWD.PNG
Views:	2
Size:	144.8 KB
ID:	3169


    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

  2. #2
    Intermediate Intermediate aurixuser is on a distinguished road
    Join Date
    Jan 2017
    Location
    China
    Posts
    155
    Points
    3100
    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.

  3. #3

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    303
    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
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  4. #4
    New Member New Member Zanuttini is on a distinguished road
    Join Date
    Oct 2017
    Posts
    2
    Points
    35
    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?

    Click image for larger version

Name:	changeBMIcommand.PNG
Views:	0
Size:	23.0 KB
ID:	3172

+ Reply to Thread
Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.