Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

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

cross mob
ziad-shaarawy
Level 1
Level 1
10 sign-ins 5 questions asked 5 sign-ins

When I power off the microcontroller and then power it on again, the program automatically starts. How can I prevent this behavior? I only want the code to execute when I debug it from DAVE.

0 Likes
2 Replies
Maragani
Moderator
Moderator
Moderator
25 solutions authored 10 likes received 100 replies posted

Hi @ziad-shaarawy 

During DAVE Ide debug initially the device will be erased and reprogrammed and the code will be there until new program get's loaded. If you don't want to run the code after debugger disconnected you can erase the MCU using XMC Flasher tool, so that the device will be erased completely.
Please use below weblink to download. 
https://softwaretools.infineon.com/tools/com.ifx.tb.tool.xmcflasher2?redirId=159477

To run the XMC Flashed tool you have to install JAVA Run Time Environment. Please download and install both.
using XMC Flasher you have to connect the device and then select erase for complete device erase.

Thanks &  Regards
Sateesh M

0 Likes
Maragani
Moderator
Moderator
Moderator
25 solutions authored 10 likes received 100 replies posted

hi @ziad-shaarawy 
If you are in debug mode, after rest the program will get halted by default at main. Which is provided in debug configuration settings by default. If you want to modify program halt at some other function you can modify by writing to this location as shown below.

Maragani_1-1712893905101.png


Please follow the steps below for debug modifications 
1. Right click on the project 
2. Select DEBUG As under which go to Debug configurations 
3. If debug configurations already done, then go to start up window and scroll down to window last
4. You can see ->set break point at main, please modify to a new function.

Please check and let us know any further questions are there to support you.

Thanks & Regards
Sateesh M

0 Likes