XMC4400, UART boot-loader in production

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

cross mob
Not applicable
My previous experience with micro-controllers is mainly tied to NXP LPC21 ARM family. Now, I am about to migrate to XMC4400 as it appears to be perfect for power management applications. I am beginning to work with XMC4400 Hexagon kit and one thing I have noticed is the presence of another micro-controller used for programming and debugging purposes. Since I don't intend to keep it on the production board, I was wondering how I will boot and program the empty-flash of XMC4400 placed at small volume production board for the first time. During work with LPC21 (and some other ARM chip vendors) I got used to do it using built-in UART boot-loader code present even if the flash is empty. Reading the "Infineon-TOO_Bootloader_v1.1-ATI-v01_01-EN.pdf" I found that XMC4400 does not provide hard-coded Bootstrap Loader routines and that I should insert them myself. It is surprising to me that, with the tons of handy peripherals, Infineon left out a boot-loader. However, it's a simple task and I will expand the application code. If only I find out how to make a first time access to the flash without the debugger.

My questions are:
1. how to design the boot-loader section of the board to achieve first-time in-circuit programming without additional micro-controller ?
2. how to engage the minimal number of pins for boot-loading (beside the dedicated TMS and TCK pins) ?
2. what programming tool to use (additional hardware/software) ?

In addition, the DAVE is a very handy tool for setting up the application and I like the way you overcame the problem of handling a huge number of registers and options. However, it doesn't look so friendly for porting application code from older projects into DAVE. Nevertheless, I hope I will find some convenient way to do so.
0 Likes
7 Replies
Not applicable
Me again. I read the app note carefully again and found some new information. I was misleaded thinking that the uart flash programmer must be a part of user code residing at code entry point (as I did in some old designs when microcontrollers were shiped without BootROM). In fact, the UART0 bootloader in XMC4400 is a primary bootloader - it performs loading of user code into RAM. This code can be anything, even the secondary bootloader which gives the possibility to erase, read or write the flash. Therefore, it's up to this code to provide the soft-coded uart flash programming. Instructions on how to carry on are given in app note.
Am I wright?
Also, the miniwiggler from Infineon is the off-board flash programmer and debugger with small size and low price. If uart flash programming is not always available, this is the right tool for me. Am I write?
0 Likes
Not applicable
Hi npedja,

Before I answer your question on the Bootloader, let me introduce you another tool called Memtool (Download Link)
Memtool is a flash programmer tool that allow downloading of Hex code to your device via UART bootstrap loader or via DAS server.
To use with DAS server, you need to connect via miniWiggler to your device.
MiniWiggler is a debugging tool, so the connection for miniWiggler to your device is the standard JTAG or SWD pin.

So, with all these tools available, I don't really think you need to build/develop your own bootloader.
It will be much faster and easier to use the tools available.

So, do you still have anything you want to know about flash programming or bootloader?
Do you still want to build your own bootloader program?
0 Likes
Not applicable
Thank you Jackson. Your answer confirms my conclusions. According to your words, Memtool is what I need, I will certainly try it. MiniWiggler is also a valuable tool I will certainly purchase. During the first phase, this will satisfy my needs. In the second phase, I intend to migrate the XMC4400 code to Linux environment where I use arm-gcc with IDE different than DAVE, and I will certainly need the CLI usb/uart bootloader. However, as far as I can see, the app note gives enough information and source code to do it successfully.

Thanks again.
0 Likes
Not applicable
You can still use SWD and JTAG debuggers from Linux. For example, OpenOCD is a toolkit that supports JTAC programming with a wide range of JTAG probes.
0 Likes
Anoop
Employee
Employee
Hi,
Is it possible to use MemTool with XMC4500 Relax Kit or Relax Lite kit? If so what is the procedure or changes required.

Thanks
0 Likes
User8819
Level 4
Level 4
You can download from Infineon XMC site application note about the bootloader which contains also the code

Infineon-XMC4000_Bootloader_ASC_example_code-AN-v01_02-EN.exe


rum
0 Likes
User7688
Level 2
Level 2
MemTool to use , you simply need a USB to RS232 converter , and connect TCK and TMS to GND to start the bootstrap.
0 Likes