How boot Xmc4200 Platform2Go without USB Debugger attached

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

cross mob
User20848
Level 1
Level 1
I have an Xmc4200 Platform2Go board and it runs ok using the usb based debugger. I would like to disconnect the usb cable and have this boot up the code that i had downloaded via the usb debugger cable. my code blinks the light once a second, among other things, so i can see if it is running. currently, it does not run (no blink) when i disconnect the usb cable and then reapply power (yet i had downloaded the code into flash, i thought). The reason i want to do this is i want to set up multiple xmc4200 boards on canbus and have them talk to each other. yet only one will be attached to computer via usb debugger.
0 Likes
1 Solution
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi

Your code seems to be using the debug semihosting interface. Without the debugger being connected it will halt the CPU.

Regards,
Jesus

View solution in original post

0 Likes
7 Replies
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

I hope you are using Dave to develop your application and program it to the XMC4200 Platform 2Go kit. When you start "debug" from Dave the code gets programmed into flash of XMC device.
You will be able to see the code running even after removing power and applying it again.

1. How are you giving power to the XMC4200 Platform 2Go kit after removing the debug cable? Are you using the VDD5 pins on the header X1?
2. After giving power to the board, what is the state of VDD3.3 LED. Did it turn on?
3. Debugger uses the USB port X101. Can you try connecting the USB cable to the second USB port X100 and check if the code is running or not?

Thanks and Regards,
Sudheesh
0 Likes
User20848
Level 1
Level 1
K Sudheesh,

Thank you for your note

I see 3.3V led on and am providing power by the non-debug usb cable. power seems ok. Perhaps my software is crashing when I don’t have debugger running.

Below is a link to my source code. It is in folder “DavePrj_BB”.

I am working with dozens of students to develop free and open source code that implements a smart building where an xmc4200 is placed at all locations within the building. One can set compiler switches as needed to create the following devices with the DavePrj_BB project: window thermal cover controller, window curtain motor controller, window rolled blind motor controller, window venetian blind motor controller, window controller, network controller, automation master controlled, LED light socket subnetwork device, LED light device controller, window wall light switch/dimmer control, hvac variable speed or on/off controller, hvac duct damper controller, or radiator valve controller. These are all networked together with CANbus.

Free and open source code & documentation is below.

BuildingBus Development Guide
http://www.ma2life.org/doc/research/ma2/BuildingBus_Development_Guide.pdf

BuildingBus Smart Building Development Initiative
http://www.ma2life.org/doc/research/ma2/Active_Window_Development_Initiative_Ma2.pdf

BuildingBus Framework Free and Open Source Code
www.ma2life.org/doc/src/BB.zip
0 Likes
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

I tried to build your project, but I am observing an error.

Error message: ../main.c:14:68: fatal error: ../../BB_Source_Code/MY_Project/MY_Master_Include_File.h: No such file or directory

I downloaded the "BB.zip" package and imported to Dave, then imported "BB_Source_Code" as mentioned on page 51 of the "BuildingBus Development Guide". Am I missing any project configurations?

Thanks and Regards,
Sudheesh
0 Likes
User20848
Level 1
Level 1
Try opening the project in the / BB / DavePrj_BB / DavePrj_BB / directory (this has a .project file). This should run ok. If it does not, then tell me what you see. This project is already set up.

There is another project that is windows visual studio at / BB / WindowsOS_Project /

this calls the same source code as the other project. source is at / BB / BB_Source_Code /

both share the same source.

the windows os project simulates 20 devices and has them talking with each other, to make sure everything works in a system. this is working ok.
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi

Your code seems to be using the debug semihosting interface. Without the debugger being connected it will halt the CPU.

Regards,
Jesus
0 Likes
User20848
Level 1
Level 1
Thank you for seeing this. Does this mean I need to click a checkbox somewhere? if so, which one? Or, do i not call Initialize_Monitors() in my main? Or both?
0 Likes
SudheeshK
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted
Hello,

You can find more details about semi hosting from the following discussion, https://www.infineonforums.com/threads/3489-DAVE-TIP-of-the-day-Semihosting-in-DAVEv4.

Thanks and Regards,
Sudheesh
0 Likes