XMC1100 Problems changing BMI from UART to SWD

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

cross mob
Not applicable
Hi all,

I'm facing a problem with changing the Boot Mode from UART ASC (Default Mode) to SWD. I use the Pins P0.14 and P0.15. For UART communication, I use a FTDI USB-UART converter. With the Memtool, provided by Infineon, version 4.6, I get the message: Connected to target.
So everything seems to be ok. But when I change the mode and try to connect with a Segger J-Link, I get no connection. Switching to Memtool, I don't get a connection as well. I came to the conclusion that the Memtool switched something in the Microcontroller but I don't know what.

The result is, that I get no connection any more, not with Memtool and not with J-Link. I hope that I gave a detailed description of my problem. If you need some more information, don't hesitate to ask. I'm happy for every hint I can get!

Sebastian
0 Likes
21 Replies
Not applicable
Hello,

a little Update: I tried to communicate via a terminal. If I send the XMC a 0x006c ( http://www.infineonforums.com/archive/index.php/t-2414.html? ) I get a 0x5D. Any ideas? Because I don't find this response in the "T o o l i n g G u i d e f o r X M C 1 0 0 0
AP32277".

Sebastian
0 Likes
Not applicable
I have new information. In this forum, I found an old post which suggested to try it with a terminal and type in: 0x006C. When I do so, I get the answer: 0x5D. I had a look in the Tooling guide regarding the boot processes. There are several answer codes described, unfortunately not 0x5D.

Thanks for helping!
Sebastian
0 Likes
Not applicable
I attached two screenshots. In the first screenshot, Memtool says "Ready for Memtool Command". But if I want to activate the Flash (Flash / OTP - Memory device enable) I get an error message, which you can see on the second screen shot.

1415.attach

1416.attach
0 Likes
Not applicable
In my previous post I forgot to mention that I tried to read the flash. According to Memtool there is an success. But a closer look at the two UART pins showed the following: The MC RxD line toggeled as expected when I clicked the start button for reading the flash. But the MC TxD line stayed low.
So I think, the MC is not even responding. I use pins P0.14 and P0.15.
0 Likes
Not applicable
Hi, Sebastian,
First, when you change the BMI from Uart ASC to SWD, may I know are you choosing SWD0 or SWD1. SWD0 is using P0.14/P0.15 while SWD1 is using P1.3/P1.2. So, if you have changed it to SWD1 and you are using P0.14/P0.15 for the J-Link debugger connection, then, the connection will not be successful.
Next, you mention that you are using Segger J-link to test the SWD connection, may I know which s/w is communicated with the Segger J-link? I think Memtool does not work with Segger J-link. So, more information on your connection setup is required to know what is causing the error in connection.
Thanks.

Cheers
tys
0 Likes
Not applicable
Hi tys,

thank you very much for your reply.

1) I choose User Mode (Debug) SWD0 (SWDIO=P0.14, SWDCLK=P0.15)
2) For changing the BMI I try to use Memtool, the configuration is: FTDI USB-Serial-Converter <=> XMC-MC
3) If the XMC-MC is in the right mode (SWD-mode) Segger is definitly able to communicate with the MC, I tried this with a development board, the chip on the development board is already in the SWD-state.
0 Likes
Not applicable
Hi, Sebastian,
Memtool v4.6 does not support Segger J-Link. So, if the XMC1000 device is in SWD0 mode(P0.14/P0.15) and you want to use Memtool to connect to it, then, please use the DAP miniwiggler (hardware) to connect to the XMC1000 device. Furthermore, in Memtool -> Target -> change -> clicked default button, choose XMC1000 -> Starter Kits (DAS) ->the device that you are using, as the target configuration. Then, you click 'connect' button on the Memtool, it should be able to connect.
If you have download DAVE4 and install DAVE4, then, you should be able to use DAVE4 to compile your code and debug your code using Segger J-Link. In this case, you do not need to use Memtool and DAP miniwiggler at all.

Cheers
tys
0 Likes
Not applicable
Perhaps I should describe my problem from the beginning:

- I designed a new custom board with the XMC1100 (XMC1100-T016X0064AA).
- By default the Pins P0.14 and P0.15 are configured as UART and not as SWD (at least according to my information from the datasheet)
- I connect the Pins P0.14 and P0.15 (configured as UART so far) to an FTDI chip, because I don't have a serial port, but I use FTDI chips very often and they never caused any problems.
- Then I start memtool and select the FTDI COM-Port. So far everything is ok.
- Then I try to connect to the chip. So as described above, there is the message "Connected to target"


Next is the step that isn't working:
- Then there is the message I posted above: Flash not ready.

If I ignore this message and try to change the boot mode index, I don't get any connect, not with UART and not with the original DAP miniwiggler. I tried to connect with this board, but that didn't working either. So I really don't know, what's wrong. For me, the message "Flash not ready" is really very strange and I don't really know why the flash shouldn't be ready.
Is the message in the Memtool wrong or do I miss anything? I can make a screenshot from the MC, but I think it isn't very interesting. Just power and the two Pins for UART/SWD are important according to my opinion. The rest of the pins are connected to another MC and a FPGA.
0 Likes
Not applicable
Hi, Sebastian,
Thank for detailed description of what happening. First, we have check the device is in which BMI mode. Could you please try sending 0x00 0x6C to the device via P0.14/P0.15 using Hyperterminal. Did you received a reply of 0x5D from the device? If yes, then the BMI of the XMC1100-T016X0064AA device is ASC BSL mode. Next, do a power reset to the XMC1100 device, open Memtool v4.6, use the FTDI COM-PORT to connect to the device. You should be able to connect to the XMC1100 device using Memtool's target configuration of 'XMC1100 Boot kit with XMC1100-T038X0064'. As you mention that by clicking the 'Enable' checkbox, it will cause error. Please try again, it should not happen.
If you encounter the same error message again, please take a snap shot of the Memtool's version number and the Memtool main GUI with the blue title bar above the file Menu bar ( the blue title bar indicates which target configuration you are using).
Thanks.

Cheers
tys
0 Likes
Not applicable
Hi tys,

thank you very much for your reply. At least a first success. The UART communication is working (I always use hterm as serial terminal). So at least the microcontroller is alive. In summary I send the command 0x00 0x6C and I get the answer 0x5D as expected. I tried several times and it is very reliable.
I'm very glad that this is working.

After trying this out, I closed hterm and started memtool 4.6. I DIDN'T touch the hardware configuration itself 🙂 And there I have the same problem again. I found two configurations which matched your description (see screenshot).

1424.attach

I think the second configuration should be the correct one, am I right? Unfortunately it isn't working. I don't get a connection. The fact that the MC just one time responds to the 0x00 0x6C with the answer 0x5D seems interesting to me. Because I tried the command several times in quick succession I discovered the following:

- As mentioned the first response is 0x5D
- With subsequent commands (that means "0x00 0x6C 0x00 0x6C") the MC responds 0x02. Don't wonder. I discovered this behaviour by coincidence by trying to send the original command 0x00 0x6C several times in quick succession.


I also attached the schematic for the XMC. I didn't add the capacitors for power integrity to the screenshot just in case you might wonder.

1425.attach
0 Likes
Not applicable
Hi, Sebastian,
After you get 0x5D reply from the XMC1100 device using the hyperterminal, please do a power reset to the device. Such as disconnect the power supply to the xmc1100 device, then power on the xmc1100 device again. By not touching the hardware configuration again after getting 0x5D reply is incorrect. This is because the XMC1100 device after reply with 0x5D, it is waiting for some other data from the hyperterminal. If you resend 0x00 0x6C to the device again after receive 0x5D reply, this is not following the ASC BSL protocol, that is why the device reply with 0x02 to hyperterminal to indicate that wrong data received.
Anyway, since we are confirm that the xmc1100 device is alive and in ASC BSL mode, so just do a power reset to the xmc1100 device. Then, select target configuration ...XMC1100-T038F0064(Minimon/ASC) in Memtool and try connect again. I think you should be able to connect to the xmc1100 device using Memtools.
Thanks.

Cheers
tys
0 Likes
Not applicable
Hi tys,

again thank you very much for your help! I really appreciate your help! If you need more information about a specific question, just ask. I'm glad for every hint that possibly can solve my problem.

Ok, so back to my problem: I tried to connect with the Memtool by clicking the button "Connect to target". Then the message occurs: Ready for Memtool command. To verify that the Memtool is really connected to the XMC, I switched off the power supply and tried to connect again to the XMC. And now it is not working as I expected.
After again powering on the board an clicking the button "Connect to target" it is again working. So the message seems to be correct, i.e. the Memtool really communicates with the XMC.

I did this the following way: I switched off the power supply and then activated the checkbox: "Periodically retry every second". Then I waited a minute. During this period, the connection dialog keeps popping up periodically every second. Then I powered the board again and after ca. two seconds the popup dialog disappeared and again the message "Connected to target" occured at the bottom.

So far so good. The problem is, when I try to enable the FLASH/OTP - Memory device, the Memtool shows the error message I posted above: "Can't activate FLASH/OTP Device!" Then I am automatically disconneted, but I am able to reconnect to the XMC with the same result. 😞

I post again the error message from above:

1416.attach
0 Likes
Not applicable
Hi, Sebastian,
I try to simulate your situation by clicking on the 'Enable' check box, but i did not encounter any error. I have attached the snap shot here. Could you please check the Memtool version that you have and also in your snapshot, please include the Memtool title bar (which i highlight in yellow in my snapshot). Furthermore, is it possible to change another xmc1100 device, just in case that device is damaged.
1426.attach

Cheers
tys
0 Likes
Not applicable
Hi tys,

I have exactly the same version as you. My version does not differ in any single number.

1427.attach

Additionally I added the image from the settings of OTP/Flash device, but all parameters are on their default value.

1429.attach


Do you think the FTDI chip can be a problem? I don't hope so, because as already mentioned I never had any problems with these USB-Serial-Converters.

Unfortunately a search by google just gives me hits from China. 😞

1430.attach

Sebastian
0 Likes
Not applicable
Hi tys,

success!!! It really was the FTDI-chip. I used the Mini-JLink, provided by the toolkit and then it worked!!!
Thanks for helping! Nonetheless I'm a little bit disappointed that it is not working with the FTDI-chip. 😞

Again thank you very much!
Sebastian
0 Likes
Not applicable
Hi there,

I am about to try the same thing with FTDI -Chip and XMC1100 (same package). Could somebody let me know, how to get the HEX-File from DAVE.

thanks in advance.
Felix
0 Likes
Not applicable
You mean to program the FTDI chip with the appropriate parameters? This is very interesting to me, too.
0 Likes
Not applicable
I am talking about getting the hexfile from DAVE to load via FTDI Chip as USB/TTL converter to the XMC.
I am using FT230 and FT232 as VCP and D2XX. My understanding ist that for programming the XMC VCP should be sufficient.
0 Likes
Not applicable
Yes, me too, Exactly the same thing I wanted to do. But as you can read, I didn't make it. So your questions is very good. I should have asked myself. 🙂 Because I'm really interested how to achive this with my FTDI chip because I want to program the XMC on my board with the onboard FTDI USB-Serial converter.

I hope anyone can help us!
0 Likes
Not applicable
Hi Sebastian83,

I found a hexfile in the DEBUG folder within the DAVE-Project. Is this the hexfile that can be used?
I will report on fail or success with FTDI as soon as I am through. This may take one or two weaks still, because I have to make some new boards.
0 Likes
Not applicable
Hi Felix,

thanks for your reply. I'm very interested in the result. I would be glad if this is working.

Best regards
Sebastian
0 Likes