BSL Programming Failure with MemTool

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

cross mob
User8683
Level 4
Level 4
First like received
Hello,

I am attempting to perform in circuit programming of my XMC1100 16 pin 64 KB flash MCU, but I am stuck because I cannot get MemTool to work properly.

The first problem is that there is no default configuration for the 16 pin XMC1100 MCUs in the list.

The second problem is that despite various attempts to create a configuration, the same useless error is provided:
---------------------------------------
Initializing MemTool failed!

with details:

Message from component 'IMTMemtool' :
Component initialisation failed !

Message from component 'IMTMemtool' :
No core available for FLASH programming !
---------------------------------------

Since the error does not talk whether it is looking for files, whether it is looking for the specific core for the MCU, it is not clear what I can do other than request assistance.

I realize that there is an example sample program to use instead of MemTool, but this just adds too many variables that could cause failure in trying to get my circuit programmed between compiling the PC tool, compiling the flash programmer and my new circuit board.
0 Likes
11 Replies
Not applicable
Hi Jason,

How is your setup to connect Memtool with your device?
Which pin are you using?
0 Likes
User8683
Level 4
Level 4
First like received
Jackson,

I think that the error is happening before even attempting to make a connection as it occurs without any connection at all. I can choose a default configuration for the 38 pin XMC1000 such as the boot kit and I will get to a screen that indicates there is no connection without ever seeing an error. However, when attempting to define the 16 pin configuration, that is when the error occurs. I have attempted to run as administrator and this makes no difference. I am using the latest version of the Memtool software.

Thanks for the help,

Jason
0 Likes
Not applicable
Hi Jason,

Can you tell me how you connect the Memtool with your board?
Is it via miniWiggler or COM Port to UART?
I need to know your setup before I could guide you on the Memtool configuration.
0 Likes
User8683
Level 4
Level 4
First like received
Jackson,

As the expert, I defer to you.

I am planning to connect Memtool to the board over a null modem cable. I would use a RS-232 chip on the receiving end and go directly into the USART pins 14 and 15 on the chip after that.
I am not sure how you set the com port and parity within Memtool however.
The configuration of the target is to use the DAS protocol.

Does that tell you enough?

Thanks,

Jason
0 Likes
Not applicable
Hi Jason,

In order to use DAS protocol, you have to use miniWiggler.
Since you connecting with a modem, you have to connect the mcu though COM Port.
Then in your case, you have to connect via ASC Bootstrap loader.

So, first open your Memtool and click Target -> Change.. -> Default
784.attach

Select XMC1000 -> Starter Kits (Bootstrap Loader) -> XMC1100 TSSOP38 (Minimon/ASC)
785.attach

Then click 'Finish' and save the configuration file.
Then now go to Target -> Setup...
at General tab, select the COM port of your modem and go to Monitor tab to choose your baudrate.
786.attach

After that click OK to save your configuration.
Connect your XMC1100 to your modem and click Connect.
If everything is setup correctly, Memtool will established connection to your device.

If Memtool is unable to establish connection, you may try to test your setup.
Reset your mcu and use any terminal program to send 0x00 to the mcu.
If no respond from mcu, means the mcu is not in ASC bootstrap loader mode and it is impossible to connect with Memtool.
If the mcu respond with 0xD5, means the mcu is in ASC BSL and it should be able to connect with Memtool.
0 Likes
User8683
Level 4
Level 4
First like received
Thanks Jackson.

I am able to connect. What I thinks needs some documentation is that the 16 pin chip can be programmed with a 38 pin configuration file to save you providing these instructions over and over. Is there anything additional that I have to do make the 16 pin configuration work? I initially tried to create a Minimon configuration file for the 16 pin chip but that was when it would fail when setting the target without letting me even load the target configuration, let alone make a connection.

So the next question is whether there is anything special about the .elf and .hex files in the Debug directory or are the files there fine to use? I programmed without error, but just want to make sure.

Thanks,

Jason
0 Likes
Not applicable
Hi Jason,

I would say you just stick to the 38pin configuration.
Basically it doesn't really matter as the ASC pin uses for these packages is the same.
As for the hex file, yes, you could use the one in the Debug directory.
0 Likes
User8683
Level 4
Level 4
First like received
Jackson,

Thanks for the clarification.

Jason
0 Likes
User19040
Level 1
Level 1
Hi to all.

I am Mike and new to the forum. I have been working with MCU (XMC4xxx, XC16x).

Since last week I try to disable my flash protection (read/write protection) with MemTool.I have noted (not forgotten) the password0 and password1, nevertheless I can not release the sectors.

5090.attach



Problem started with an addition of the following function in the initialization phase:

static void flash_protection_install_cmd(void)
{
if ((XMC_FLASH_GetStatus() & XMC_FLASH_STATUS_PROTECTION_INSTALLED) == 0)
{
/* if no protection is installed -> install it*/
XMC_FLASH_EraseUCB(XMC_FLASH_UCB0);
XMC_FLASH_InstallProtection(0, XMC_FLASH_PROTECTION_READ_GLOBAL, FLASH_PSW_0, FLASH_PSW_1);
XMC_FLASH_ConfirmProtection(0);

printf("Resetting device...\n");

XMC_SCU_RESET_ClearDeviceResetReason();
NVIC_SystemReset();
}
else
{
printf("INFO: Protection already installed!!\n");
}
}

What I don't understand is that I have only defined a read lock and still I can't write to the flash.


Do you have any ideas?

Thanx

Mike
0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked
Hi Mike,

It might be best to start a new forum thread if your issue is new. This will give your question more attention and make the threads issue specific.

Now regarding your question, The read protection will also enable a global write protection and the debugger will not have access anymore.
See Flash Protection in reference manual.

"For an effective IP protection the Flash read protection must be activated. This ensures
system wide that the Flash cannot be read from external or changed without
authorization."


You need to foresee this and implement a backdoor if you wish to disable the protection using another communication interface.

Now to connect to your device you can use ASC BOOT Loader. The shortest way is to use any kind of COM Port (usually USB-UART device) to lines P1.4 P1.5 and connect to it by Infineon Memory Tool.
Note that lines TMS and TCK must be grounded at reset, which forces ASC BOOT mode in the device. At least you can disable FLASH protection and unbrick you device for further development.

Best Regards,
Vasanth
0 Likes
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked
Hello Mike,

Please note that the UCB sectors can only be written to a limited number of times. UCBs being logical sectors allow erase and re-program of UC pages up to 4 times. Exceeding this might lead to an unusable device.

Can you check if your device boots up normally, you can run a simple blink led example to see if the program works.

Regards,
Dheeraj
0 Likes