infineon4engi@twitter twitter

infineon4engineers Facebook

infineon@linkedin linkedin

infineon@youtube youtube


+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Jackson
    Guest

    XMC1000 TIP of the day: Changing XMC1000 Boot Mode Index (BMI)

    Boot Mode Index (BMI) can be change via Memtool.
    First, connect the device with Memtool. The device can be connect via UART BSL if the device is in UART BSL mode or connect via DAS if the device in SWD or SPD mode.
    For connect via DAS, Infineon miniWiggler is required.
    Next, go the "Setup" in Memtool and select the "Protection/BMI" tab.
    Check on the box of "Intall BMI configuration" and choose the Boot Mode you want to change, then click "OK".
    The next go to "HW Protect", select "Change current Protection and BMI configuration" and click "Start".
    Once it is done, Memtool will prompt "Protection operation failed" as we do not set anything for the protection.
    Then reset your device and it will go into the boot mode you have selected.

    WARNING: You must know what you are doing. Once you have changed the BMI, you must have the mean to connect to the device using the mode you have change.
    Last edited by Jackson; Jun 17th, 2013 at 09:11 PM.

  2. #2

    Infineon Employee
    Infineon Employee
    Expert
    Arno is on a distinguished road
    Join Date
    Dec 2011
    Location
    Munich / Germany
    Posts
    37

    Changing XMC1000 Boot Mode Index (BMI) with user program

    There is another method to set the BMI by calling a ROM routine.
    This DAVE-example first checks on current BMI and changes BMI to requested one only if not yet installed.

    Code:
    #include <DAVE3.h>			//Declarations from DAVE3 Code Generation (includes SFR declaration)
    
    /* Constants definitions */
    // Start address of the ROM function table
    #define ROM_FUNCTION_TABLE_START (0x00000100)
    #define _BmiInstallationReq (ROM_FUNCTION_TABLE_START + 0x08)
    
    // Pointer to Request BMI installation routine
    #define XMC1000_BmiInstallationReq (*((unsigned long (**) (unsigned short)) _BmiInstallationReq))
    #define BMI (*(uint16_t*) 0x10000E00)
    
    #define SPD0 (0xF9C3)                    // SPD0 (P0.14) with User Mode Debug
    #define SWD0 (0xF8C3)                   // SWD0 (P0.14, P0.15) with User Mode Debug
    
    #define BMI_MODE SPD0
    
    void ChangeBMI(void)
    {
    	// Call the BMI_installation routine to set BMI 
    	if( BMI != BMI_MODE )
    	{
    		XMC1000_BmiInstallationReq( BMI_MODE );
    		while(1);
    	}
    }
    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.

  3. #3
    marisg is on a distinguished road
    Join Date
    May 2013
    Location
    Bangalore, India
    Posts
    6
    Points
    43.75
    Jackson, thanks for the useful information. You mentioned that "the device can be connect via UART BSL if the device is in UART BSL mode or connect via DAS if the device in SWD or SPD mode.". How can I find what is the current BMI mode configured on the chip?. I mean what will be the default factory settings for BMI.

    Thanks in advance.

  4. #4

    Infineon Employee
    Infineon Employee
    Expert
    Arno is on a distinguished road
    Join Date
    Dec 2011
    Location
    Munich / Germany
    Posts
    37
    Default of the device is UART BSL. The boot kits come with SWD DEBUG mode.
    SWD is fully supported by SEGGER J-LINK LITE which is the debug interface of the boot kits. This interface is also supported by DAVE debugger.
    Last edited by Arno; Jun 29th, 2013 at 03:13 AM.
    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.

  5. #5
    jml1006
    Guest

    Changing BMI on XMC1300 eval board with new XMC1302.

    I'm using the SEGGER J-LINK LITE debug interface attached to my XMC1300 eval board, and I'm trying to change the BMI on a freshly populated XMC1302 device, via the virtual com port on the J-Link and UART BSL (P1.2 & P1.3). I'm using the instructions in the XMC1000 Tooling Guide to no avail.

    MemTool fails to connect to the target and I get the following report..

    Can anyone tell me what I might be doing wrong?
    Code:
    ----------------------------------------------------------
    
      Connection Failed Report from
      Infineon Memtool Target Interface, Version: 1.10.9
      created: 07/31/13, 14:02:41
    
    ----------------------------------------------------------
    
    Windows version:
      Win7 (Service Pack 1)
      Admin: yes
    
    IMT version:
      Release:  4.05.08
      Build:    4409
      Path:     C:\Program Files (x86)\Infineon\Memtool 4.5
    
    Target configuration file:
      C:\Users\jml1006\Documents\Infineon\IMT 4.5\Targets\xmc1000_tssop38_evaluationboard_xmc1300_minimon_asc.cfg
    
    Error messages:
      MiniMonTargIntf: Can't connect target !
      MiniMonTargIntf: Failed to open serial port !
      MiniMonTargIntf: Port error: The system cannot find the file specified.
    
    
    
    Settings:
      PortNum:  0
      PortType:  COMX
      PortSel:  JLink CDC UART Port
      ReqReset:  n
      ReqResetMsg:  
      ResetOnConnect:  y
      ResetWaitTime:  500
      ExecInitCmds:  n
      ExtStartMode:  n
      InitScript Script:
        
      BaudRate:  38400
      KLineProt:  n
      UseRS232Drv:  y
      CanPortNum:  1
      MonType:  ASC
      CheckAckCode:  y
      AlwaysEINIT:  n
      UseExtMon:  n
      MonitorPath:  
      LoaderStart:  0xFFFFFFFF
      LoaderSize:  0x00000000
      UseExtMon2:  n
      Mon2Path:  
      Mon2Start:  0xFFFFFFFF
      SCRMSupport:  n
      SCRMBaudRate:  0
      RSTCON_H:  0x00
      S0BRL:  -1
      UseChangedBaudRate:  n
      Sv2PLLCON:  0x7103
      Sv2ASC0BG:  0xFFFF
      Sv2CANBTR:  0xFFFF
      TcPllValue:  0x00000000
      TcPllValue2:  0x00000000
      TcPllValue3:  0x00000000
      TcAscBgValue:  0x00000000
      TcCanBtrValue:  0x00000000
      XC2000ScrmClock:  40000000
      XC2000ScrmPllValue:  
      XC2000ScrmBrgValue:  
      MaxReadBlockSize:  0
      BootPasswd0:  0xFEEDFACE
      BootPasswd1:  0xCAFEBEEF
      DasDllPath:  das_api.dll
      DasHost:  
      DasTryStartSrv:  y
      DasSrvPath:  servers\udas\udas.exe
      DasStopSrv:  y
      DasResetMode:  2
      DasRemoveLogFile:  n
      DasSrvSel:  -1
      DasPortType:  0
      DasPortSel:  0
    
    Info:
      ArchType:  5
      Architecture:  ARM
      TcDerivate:  0
      IsXC2x:  n
      IsStm32:  n
      ExtClock:  64000000
      IntClock:  64000000
      SysClock:  64000000
      PllCalc:  
      PllValueCount:  1
      UsedComPort:  4
      CurrBaudRate:  0
      CurrMonImage:  CortexM.Asc.XMC1000.Def
      AscBslAllowed:  y
      CanBslAllowed:  n
      ScrmSupport:  n
      CanScrmSupport:  n
      AscBslForceKLine:  n
      CanBslBug:  n
      TcCanBslMode:  0
      Tc1797AscBslBug:  n
      AurixKlineBug:  n
      AbmModeDetected:  n

  6. #6
    jml1006
    Guest
    I found the issue. The canned configuration setup for the XMC1300 sets the target up for a 64Mhz clock frequency. I changed this clock freq to 16MHz via the Target config->controller tab, and that solved my problem. The Tooling guide specs the baud rates for 8Mhz-32Mhz, so I think the 64Mhz default clock rate was out of spec for setting up the BMI via ACL-BSL.

  7. #7
    jml1006
    Guest
    Upon further review, I needed to only change the baudrate to 19200 while leaving the default 64MHz clock set.

    The virtual COM seems to act very unreliably.

  8. #8
    marisg is on a distinguished road
    Join Date
    May 2013
    Location
    Bangalore, India
    Posts
    6
    Points
    43.75
    I'm using the SEGGER J-LINK LITE debug interface attached to my XMC1200 eval board, and I'm trying to change the BMI on a freshly populated XMC1200 device, via the virtual com port on the J-Link and UART BSL (P1.2 & P1.3).

    MemTool fails to connect to the target and I get the following report..

    Have any one faced similar issues and any solution for this.

    I have tried the following 2 configuration.
    64MHZ with 19200 Baud
    16MHZ with 19200 Baud

    ----------------------------------------------------------

    Connection Failed Report from
    Infineon Memtool Target Interface, Version: 1.10.6
    created: 08/16/13, 06:14:16

    ----------------------------------------------------------

    Windows version:
    Win7 (Service Pack 1)
    Admin: yes

    IMT version:
    Release: 4.05.05
    Build: 4406
    Path: C:\Program Files\Infineon\Memtool 4.5

    Target configuration file:
    C:\Users\marisg\Documents\Infineon\IMT 4.5\Targets\xmc1000_tssop38_evaluationboard_xmc120 0_minimon_asc.cfg

    Error messages:
    MiniMonTargIntf: Can't connect target !
    MiniMonTargIntf: Start monitor failed
    MiniMonTargIntf: Bootstrap loader not responding !
    Please check:
    - Target power supply
    - Communication cable
    - Communication settings

    Settings:
    PortNum: 0
    PortType: COMX
    PortSel: COM18
    ReqReset: n
    ReqResetMsg:
    ResetOnConnect: y
    ResetWaitTime: 500
    ExecInitCmds: n
    ExtStartMode: n
    InitScript Script:

    BaudRate: 19200
    KLineProt: n
    UseRS232Drv: y
    CanPortNum: 1
    MonType: ASC
    CheckAckCode: y
    AlwaysEINIT: n
    UseExtMon: n
    MonitorPath:
    LoaderStart: 0xFFFFFFFF
    LoaderSize: 0x00000000
    UseExtMon2: n
    Mon2Path:
    Mon2Start: 0xFFFFFFFF
    SCRMSupport: n
    SCRMBaudRate: 0
    RSTCON_H: 0x00
    S0BRL: -1
    UseChangedBaudRate: n
    Sv2PLLCON: 0x7103
    Sv2ASC0BG: 0xFFFF
    Sv2CANBTR: 0xFFFF
    TcPllValue: 0x00000000
    TcPllValue2: 0x00000000
    TcPllValue3: 0x00000000
    TcAscBgValue: 0x00000000
    TcCanBtrValue: 0x00000000
    XC2000ScrmClock: 40000000
    MaxReadBlockSize: 0
    BootPasswd0: 0xFEEDFACE
    BootPasswd1: 0xCAFEBEEF
    DasDllPath: das_api.dll
    DasHost:
    DasTryStartSrv: y
    DasSrvPath: servers\udas\udas.exe
    DasStopSrv: y
    DasResetMode: 2
    DasRemoveLogFile: n
    DasSrvSel: -1
    DasPortType: 0
    DasPortSel: 0

    Info:
    ArchType: 5
    Architecture: ARM
    TcDerivate: 0
    IsXC2x: n
    IsStm32: n
    ExtClock: 64000000
    IntClock: 64000000
    SysClock: 64000000
    PllCalc:
    PllValueCount: 1
    UsedComPort: 18
    CurrBaudRate: 19200
    CurrMonImage: CortexM.Asc.XMC1000.Def
    AscBslAllowed: y
    CanBslAllowed: n
    ScrmSupport: n
    CanScrmSupport: n
    AscBslForceKLine: n
    CanBslBug: n
    TcCanBslMode: 0
    Tc1797AscBslBug: n
    AurixKlineBug: n
    AbmModeDetected: n

  9. #9
    Jackson
    Guest
    Hi marisg,

    Can you try to connect with lower baudrate (i.e. 9600)?
    You can change it at Memtool Target -> Setup -> Monitor tab.

  10. #10
    mgerber
    Guest
    Maybe the issue is already solved, but i want to share my experience to anyone having trouble connecting to XMC 1300 BootKit (CPU-13A-V1) via Memtool 4.05.08 Build 4409.
    As i understood, BMI of the XMC1302 on the BootKit is set to "User Mode (Debug) SWD0". The only way i could connect to the BootKit so far, was through Minimon/ASC. So i had to change BMI before being able to connect via Memtool.

    For me, this procedure worked:
    - update SEGGER J-Link with SEGGER J-Link Configurator to "J-Link Lite-XMC4200 Rev.1 compiled Jun 27 2013 19:41:03”
    - with DAVE 3.1.8 (not passible with DAVE 3.1.6 !): change BMI from "User Mode (Debug) SWD0" to "ASC Bootstrap Load Mode (ASC_BSL), no debug"
    - start Memtool 4.05.08 as administrator (running on Win7 x64)
    - press Connect, then unplug and replug the bootkit and press retry (sometimes you have to do this several times and on different USB-Ports of you PC)

    If i'm lucky to get a connection, i can disconnect and reconnect and also change the baud rate.
    My experience is also that virtual com is quite unstable!

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.