XMC1400 changing BMI back and forward between UPM and UDM

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

cross mob
User16911
Level 1
Level 1
First like received
Hi,
I'm currently trying to figure out how to change the BMI of an XMC1402 from UDM to UPM and back again to UDM.
In the current project I'm using P0.2 and P0.3 as an asynchronous serial communication to change the BMI.
With a specific command, I'm calling the following routine:
XMC_SCU_SetBMI( XMC_SCU_BMI_HWCFG_UPM, 0 );
and this works very well.

My problem is when I want to restore the BMI back to UDM. In this case with another serial command I'm calling the following routine:
XMC_SCU_SetBMI( XMC_SCU_BMI_HWCFG_UMD
| XMC_SCU_BMI_HWCFG_PINDIS
| XMC_SCU_BMI_DAPTYP_SWD
| XMC_SCU_BMI_DAPDIS_CHANNEL_0,
0 );

when fetching the BMI with DAVE's BMI Get Set tool, it says ASC_BSL (?) , and after resetting the MCU, I can't connect to it anymore.

Am I missing something with this whole procedure?

thank you,
Andrei.
0 Likes
1 Reply
User16911
Level 1
Level 1
First like received
Reading the Application Note: AN_201511_PL30_005 it clearly states that "For code protection purposes, if the current BMI value is User Productive Mode (UPM) and the newly requested BMI value
* is NOT User Productive Mode (UPM), the Start-up software will erase the full flash of the device, and re-install the default BMI (ASC_BSL).
"

Therefore, when enabling the Debug mode, the routine to call will be:

/* Switch to ASC Bootstrap Loader */
XMC_SCU_SetBMI( XMC_SCU_BMI_HWCFG_ASC_BSL, 0 );