infineon4engi@twitter infineon4engineers infineon@linkedin infineon@youtube
twitter Facebook Linkedin Youtube

+ Reply to Thread
Results 1 to 10 of 10

Thread: XMC1400 Bricked after setting the BMI

  1. #1
    Beginner Beginner amanning will become famous soon enough
    Join Date
    Oct 2015
    Posts
    106
    Points
    223.9453125

    XMC1400 Bricked after setting the BMI

    In my application I set the BMI mode to ASC BSLTO with a timeout of 5 second. The processor reset, but now no communication is possible.
    I have connected the Dave4 BMI Get Set tool to both channels, but the BMI Value cannot be read. If I try to set a new BMI value with this tool, it says it cannot read the BMI! This just does not make sense.
    When reading it mentions a timeout, is this the 5 seconds timeout, or some other undocumented timeout?

    Why is it not possible to read the current setting or write a new setting? I am using the Boot Kit debugger.

    I would expect the processor to boot from Flash after 5 seconds, but this does not happen, why? What can I have done wrong? I set the boot mode to 0x50 with a timeout of 0xF.
    Last edited by amanning; Jul 3rd, 2020 at 05:24 AM.

  2. #2

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    775
    Hi,

    Which value did you set to BMI.PINDIS?
    Normally for ASC BSLTO you need to use BMI=0xFFD0, with BMI.PINDIS=1 so that Boot from BMI is selected.

    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.

  3. #3
    Beginner Beginner amanning will become famous soon enough
    Join Date
    Oct 2015
    Posts
    106
    Points
    223.9453125
    I used the XMClib function XMC_SCU_setBMI(), this does not have the possibility to set the PINDIS. I assume it sets it correctly, but I have not looked at the code.

  4. #4
    Beginner Beginner amanning will become famous soon enough
    Join Date
    Oct 2015
    Posts
    106
    Points
    223.9453125
    I have just looked at the source files and seen in the header file there is a definition XMC_SCU_BMI_HWCFG_PINDIS, but this is not described in the documentation.
    Click image for larger version

Name:	BMI doc.png
Views:	0
Size:	50.2 KB
ID:	4965

  5. #5
    Beginner Beginner amanning will become famous soon enough
    Join Date
    Oct 2015
    Posts
    106
    Points
    223.9453125
    I have now set the PINDIS bit and things are working a bit better.
    The processor resets and after the timeout reboots from Flash, so far so good.

    The problem is that I cannot connect the debugger anymore. I assume it is now in User Productive Mode (UPM).

    If I try to read or set the BMI with the Dave4 "BMI Get Set" Tool, I just get an error message (timeout too short or not connected). What timeout is this? How long is the timeout? What do I have to do to set a new BMI?

    My debugger is connected to the controller via the SWDCLK/SWDIO connected to pins 0.14/0.15. Is this the problem?

  6. #6

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    775
    Hi,

    After the time expires the microcontroller goes into user mode where the debug interface is disabled. At this point you cannot get or modify the BMI using an external tool.

    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.

  7. #7
    Beginner Beginner amanning will become famous soon enough
    Join Date
    Oct 2015
    Posts
    106
    Points
    223.9453125
    How long is this timeout?
    Where is it documented?
    I power the controller and try to read the BMI within the first second, but it still cannot read the BMI.

  8. #8

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    775
    Hi,

    the BSLTO is part of the BMI configuration and described in the reference manual:
    Click image for larger version

Name:	xmc1400_bmi_bslto.png
Views:	0
Size:	46.7 KB
ID:	4987

    The frequency of the MCLK during the SSW (start up software) is determined by the CLKVAL1_SSW in the startup file. By default it is set to 8MHz.
    You should check also the value of the WAIT_ASCBSL_ENTRY_SSW in the same file.


    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.

  9. #9
    Beginner Beginner amanning will become famous soon enough
    Join Date
    Oct 2015
    Posts
    106
    Points
    223.9453125
    I am getting more and more confused with this whole BMI subject.

    I programmed the BMI to ASC_BSLTO mode with 5s timeout. This seemed to work as the controller reset and then as there was no ASC communication it started after 5s with a normal boot from flash. This is exactly as I expected.

    I then powered down the controller and restarted it. It did NOT wait for 5s, but booted immediately from flash, so obviously the BMI has been changed by the system to some other setting. As I cannot connect with the debugger I assume it is in UPM. Is this expected?
    After a timeout in the ASC_BSLTO is the BMI register changed or does it remain the same? If it changes, what does it change to? How can I get it out of this mode?
    As far as I understand the BSLTO is only for the ASC_BSLTO and SSC_BSLTO modes, but from your answer above it would seem that the timeout is relevent in all boot modes.

    I hope you can answer all my questions as I am not getting any response the the infineon support.

  10. #10

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    775
    Hi,

    The BMI.BSLTO is only valid for any BSL mode, i.e. ASC Mode, CAN mode and SSC mode
    After the time out expires, the device will boot from flash in user productive mode, i.e. no debug access possible. The BMI will not be changed.

    Are you sure that in your code you are not requesting a new BMI installation?
    BTW: If the BSLTO is configured to 0, the SSW does not perform any BSL check but directly starts in User Productive Mode for ASC BSL with time-out mode.

    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.

+ Reply to Thread

Tags for this 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.