Hi,
I am new on Kinetis and IAR .
Now I wrote a liitle program with IAR EWB 6.3 for my Kinetis K40 Tower.
I can execute my progam by debugging with my JLink debugger, but when I will start my program after a Power off -> on, the program will not start.
I have already tried many ICF files but none file works.
What is wrong in my source ?
I have attached my project. May be someone can help.
Thanks in advance ..
RW
Solved! Go to Solution.
I found my mistake .
now I can run my program from flash.
It was a wrong setting in the project options ...
under General options / library Configuration -> stdout/stderr must be set to "Via SWO" .
Thanks for all they want help
Hi.
I had the same problem. I added wait() for 0.25 second after MCU initialization and before all peripheries initialization. The time that you need for delay you can try by yourself.
Evgeni.
R&D Engineer
Thanks for your fast reply, but that was not the reason ...
:smileysad:
Can nobody help me ? :smileysad:
Hi
See pages 30/31 of the following http://www.utasker.com/docs/KINETIS/uTaskerV1.4_Kinetis_demo.pdf "Reset and Watchdog"
Maybe that will explain a possible difficulty.
Regards
Mark
Hi,
in debugging mode all works fine, but it does not work when I will start the firmware without debugger.
RW
hmm,
can somebody try it on your own K40 tower ?
RW
Hi royw,
i run your example, your project does not have correctly set up the start up code. It should start with crt0.s and jump to the start().
If you check start function, first step is to disable wdog then call sysinit. Your problem was to disable wdog : wdog_disable();
Then it runs even after power reset.
Regards,
MartinK
Hi Martin,
I don't understand what you mean.
In my project is the "crt0.s" implemented and the start() function call the wdog_disable(); as first. (start.c) .
I can set a breakpoint to this line ind start() and the debugger stopp at this line.
why do you call function sysinit from main function?
I downloaded your project and I set breakpoint to the startup code. it did not jump there . Therefore quickly i called wdog_disable() and sysinit() from main. then everything worked after power on reset.
I have made a smaller project with blinking LEDs.
(.zip file attached)
Can somebody test it on your own K40-tower.
With JLinks debugger I can Start and debug this project.
But it don't start from self after Power on ...
Thanks for your help
I found my mistake .
now I can run my program from flash.
It was a wrong setting in the project options ...
under General options / library Configuration -> stdout/stderr must be set to "Via SWO" .
Thanks for all they want help