I am using a K10 processor with CW 10.1. I have been able to load my software to flash and run with the JTAG programmer. The problem is when I remove the programmer and try to boot from flash on powerup, it doesn't boot. I am using some auto generated device init code but I am not using PE. I have checked the reset pin and it seems to be doing as it should. What am I missing? Again, it runs fine when I load the flash through the jtag, but if I try to boot from flash on powerup it doesn't work. Any help is greatly appreciated.
K
解決済! 解決策の投稿を見る。
Fixed the issue. I had a couple things going on. First of all, I had to re-flash my PnE multilink JTAG programmer. It got to the point where my usb port would not recognize it. Not sure how that happened but once I re-flashed it it was happy. Second of all, I was using the incorrect derivative of the K10 in Code warrior. I was using the derivative with FlexNVM in CW, while the part on my board did not have FlexNVM. I am somewhat suprised CW would even let me attempt to program the incorrect part, let alone debug it. Anyways, once I got those issues straightened out everything is working as it should.
I guess the lesson I learned is to double check which component I tell code warrior I am using and don't rely on it to catch any of my dumbass mistakes.
Fixed the issue. I had a couple things going on. First of all, I had to re-flash my PnE multilink JTAG programmer. It got to the point where my usb port would not recognize it. Not sure how that happened but once I re-flashed it it was happy. Second of all, I was using the incorrect derivative of the K10 in Code warrior. I was using the derivative with FlexNVM in CW, while the part on my board did not have FlexNVM. I am somewhat suprised CW would even let me attempt to program the incorrect part, let alone debug it. Anyways, once I got those issues straightened out everything is working as it should.
I guess the lesson I learned is to double check which component I tell code warrior I am using and don't rely on it to catch any of my dumbass mistakes.
Hi Guys
Im running into the same problem but with the K60 Dev board.
Any pointers on what else to look for?
Im using MQX 3.8 + IAR + TWR-K60N512
thanx in advnace
I have a service request in to freescale. I will share what I learn from that.
K
Hi
Check how the code is handling the watchdog on initialisation - if it is trying to reconfigure or stop the watchdog it must do it within 256 bus clocks otherwise the attempt will cause it to fire. See page 32 of the following for details:
http://www.utasker.com/docs/KINETIS/uTaskerV1.4_Kinetis_demo.pdf
This is a potential cause since the debugger will probably disable the watchdog and so such difficulties are not seen.
Regards
Mark
Mark,
Thanks for the reply! I read the similar thread on the IAR stuff and checked that the watchdog is disabled. It is the first thing that is hit in the code on startup after setting the interrupt vector table. Here is a small snippet of code to show where I do this:
void __init_hardware(void)
{
SCB_VTOR = (uint32_t)__vector_table; /* Set the interrupt vector table position */
/*
Disable the Watchdog because it may reset the core before entering main().
There are 2 unlock words which shall be provided in sequence before
accessing the control register.
*/
*(volatile unsigned short *)KINETIS_WDOG_UNLOCK_ADDR = KINETIS_WDOG_UNLOCK_SEQ_1;
*(volatile unsigned short *)KINETIS_WDOG_UNLOCK_ADDR = KINETIS_WDOG_UNLOCK_SEQ_2;
*(volatile unsigned short *)KINETIS_WDOG_STCTRLH_ADDR = KINETIS_WDOG_DISABLED_CTRL;
I even tried moving the watchdog disable in front of the vector table stuff but it didn't make a difference.
Thanks!
K