XMC1400 Bricked after setting the BMI

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

cross mob
User10696
Level 4
Level 4
First solution authored
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.
0 Likes
9 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
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
0 Likes
User10696
Level 4
Level 4
First solution authored
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.
0 Likes
User10696
Level 4
Level 4
First solution authored
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.
4497.attach
0 Likes
User10696
Level 4
Level 4
First solution authored
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?
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
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
0 Likes
User10696
Level 4
Level 4
First solution authored
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.
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

the BSLTO is part of the BMI configuration and described in the reference manual:
4515.attach

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
0 Likes
User10696
Level 4
Level 4
First solution authored
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.
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
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
0 Likes