I am trying to debug a simple test application on a Freescale KL05 microcontroller using CodeWarrior10.6 and a J-Link. I have identified 2 issues that seem to be related to the J-Link, and was wondering if there was a workaround for them.
First, my application needs to use the Watchdog timer, but as I understand from reading the J-Link user guide, when detecting a Kinetis device, j-Link performs a reset type 6 which disables the watchdog. This is disastrous as the Kinetis provides no mechanism to reenable the watchdog after it has been disabled. Is there a way to change the default J-Link behavior so that it executes a reset type 0 which does not have this undesirable side effect? My code will be responsible for keeping the watchdog alive.
Second, it seems that when using the J-Link I am prohibited from using the Kinetis internal flash memory controller to update the flash contents. I can program the registers on the Kinetis FMC and the write/erase procedure is reported to succeed, but it would seem that the J-Link is ultimately somehow blocking the flash write from taking place. A friend of mine who gave me the example code is using a MultiLink PE device and the code works perfectly, so I know it is not a coding bug. The only difference between our setups is the J-Link.
Can anyone here suggest how to correct these issues? I have read all the documentation I can find, but I haven't seen any discussion on it. If there is a thread or a document somewhere that I have missed I apologize.
Any advice or assitance is appreciated.
First, my application needs to use the Watchdog timer, but as I understand from reading the J-Link user guide, when detecting a Kinetis device, j-Link performs a reset type 6 which disables the watchdog. This is disastrous as the Kinetis provides no mechanism to reenable the watchdog after it has been disabled. Is there a way to change the default J-Link behavior so that it executes a reset type 0 which does not have this undesirable side effect? My code will be responsible for keeping the watchdog alive.
Second, it seems that when using the J-Link I am prohibited from using the Kinetis internal flash memory controller to update the flash contents. I can program the registers on the Kinetis FMC and the write/erase procedure is reported to succeed, but it would seem that the J-Link is ultimately somehow blocking the flash write from taking place. A friend of mine who gave me the example code is using a MultiLink PE device and the code works perfectly, so I know it is not a coding bug. The only difference between our setups is the J-Link.
Can anyone here suggest how to correct these issues? I have read all the documentation I can find, but I haven't seen any discussion on it. If there is a thread or a document somewhere that I have missed I apologize.
Any advice or assitance is appreciated.