May 19, 2020
06:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 19, 2020
06:03 AM
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.
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.
1 Reply
May 26, 2020
05:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 26, 2020
05:24 AM
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 );
* 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 );