<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MC9S08GB60A - Device initialization following reset with and without BDM in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202546#M16670</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;Jim, I just saw your post.&lt;BR /&gt;&lt;BR /&gt;How I know it's not working quite right is because from my main loop, I check if there is data in a FIFO buffer, if so, I format it and send it out the serial port, I also hold an LED on while I'm doing that.&amp;nbsp; Neither the LED nor the serial port data appears when it's not working.&amp;nbsp; I have an interrupt service routine (ISR) which runs every second and toggles an LED.&amp;nbsp; It also stores some data into the FIFO, which should then be read by the main loop (but doesn't).&amp;nbsp; I'd love to connect the BDM when the device is in it's funny state, but I'm not aware of how to do that without reprogramming the device and losing the state.&amp;nbsp; Can you please explain how to do it?&lt;BR /&gt;I'm thinking there may be something strange happening in the FIFO data initialization, or maybe in the way the ISR is setup.&amp;nbsp; I just can't understand why it would work with the BDM though.&amp;nbsp; What is different in the way the device is brought up with the BDM connected, compared to without it?&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by agreer on &lt;SPAN class="date_text"&gt;2008-03-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;04:27 PM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by agreer on &lt;SPAN class="date_text"&gt;2008-03-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;04:28 PM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by agreer on &lt;SPAN class="date_text"&gt;2008-03-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;04:51 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Mar 2008 23:27:04 GMT</pubDate>
    <dc:creator>agreer</dc:creator>
    <dc:date>2008-03-13T23:27:04Z</dc:date>
    <item>
      <title>MC9S08GB60A - Device initialization following reset with and without BDM</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202540#M16664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When I program the device flash and keep a debug session open with the BDM, everything works fine.&amp;nbsp; When I reset the device through the debug interface, that works fine too.&amp;nbsp; If I end the debug session and then power cycle the device to reset it, things stop working.&amp;nbsp; I think it might be some strange variable initialization issue, but I haven't been able to track it down.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a known issue and if so, what is the workaround?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this is not a know issue, what would you suggest I try doing to correct or at least identify the source of the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 11:18:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202540#M16664</guid>
      <dc:creator>agreer</dc:creator>
      <dc:date>2008-03-13T11:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08GB60A - Device initialization following reset with and without BDM</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202541#M16665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The usual suspects with the description "it only works with a BDM attached" are the watchdog and write once registers. Search in this forum too, the description sounds familiar&amp;nbsp; :smileyhappy:.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 11:37:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202541#M16665</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2008-03-13T11:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08GB60A - Device initialization following reset with and without BDM</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202542#M16666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I thought that it might be the watchdog, as you say, but when I tried defining _DO_FEED_COP_ in start08.c, everything died.&amp;nbsp; Nothing would run, not even with the BDM connected.&amp;nbsp; I do have a large number of global variables to be initialized, so I imagine the copy-down routines are running for quite a long time.&amp;nbsp; Maybe I'll just try adding some code to disable the watchdog from start08.c instead of messing around with the built in #defines.&amp;nbsp; Does the BDM keep the watchdog disabled or something?&amp;nbsp; I just can't figure out why it works with BDM, but not without...&lt;BR /&gt;Let me know if you have any other ideas.&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 14:07:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202542#M16666</guid>
      <dc:creator>agreer</dc:creator>
      <dc:date>2008-03-13T14:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08GB60A - Device initialization following reset with and without BDM</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202543#M16667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;OK, I added code to disable the watchdog in the init function but it didn't seem to make a difference.&amp;nbsp; Maybe what I should try is disabling/removing all the initialization code (ALL of it) and just initializing the stack pointer and then jumping to main.&amp;nbsp; Is that a good idea, and how hard is it to do that with Codewarrior?&amp;nbsp; I tried searching the forums like you said and I couldn't find many thread with problems like mine.&amp;nbsp; The other potential cause you mentioned were write once registers.&amp;nbsp; I couldn't find anything in my code that accesses any of them; can you expand on what you said?&lt;BR /&gt;Thanks again!&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 22:57:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202543#M16667</guid>
      <dc:creator>agreer</dc:creator>
      <dc:date>2008-03-13T22:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08GB60A - Device initialization following reset with and without BDM</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202544#M16668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;It might help if you further clarified what you are seeing.&lt;BR /&gt;&lt;BR /&gt;When you say not working, how is it that you know that?&lt;BR /&gt;LEDS don't flash etc. Tell more specifically what is not working.&lt;BR /&gt;Also, you could attach the BDM after it fails to start and perhaps gather more information.&lt;BR /&gt;&lt;BR /&gt;I would not change the start up code. Normally this is not a problem, and the fact that you have many variables should not be a problem either.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 23:14:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202544#M16668</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-03-13T23:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08GB60A - Device initialization following reset with and without BDM</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202545#M16669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I should mention too that when I power cycle the device without the BDM connected, my interrupt routines seem to run as expected, it's just part of my main loop which depends upon a global flag to run that doesn't work right.&amp;nbsp; That's what makes me think it's an initialization problem.&amp;nbsp; It doesn't seem to be resetting like it would from a watchdog problem, so maybe that's the wrong direction to be taking.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 23:22:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202545#M16669</guid>
      <dc:creator>agreer</dc:creator>
      <dc:date>2008-03-13T23:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08GB60A - Device initialization following reset with and without BDM</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202546#M16670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;Jim, I just saw your post.&lt;BR /&gt;&lt;BR /&gt;How I know it's not working quite right is because from my main loop, I check if there is data in a FIFO buffer, if so, I format it and send it out the serial port, I also hold an LED on while I'm doing that.&amp;nbsp; Neither the LED nor the serial port data appears when it's not working.&amp;nbsp; I have an interrupt service routine (ISR) which runs every second and toggles an LED.&amp;nbsp; It also stores some data into the FIFO, which should then be read by the main loop (but doesn't).&amp;nbsp; I'd love to connect the BDM when the device is in it's funny state, but I'm not aware of how to do that without reprogramming the device and losing the state.&amp;nbsp; Can you please explain how to do it?&lt;BR /&gt;I'm thinking there may be something strange happening in the FIFO data initialization, or maybe in the way the ISR is setup.&amp;nbsp; I just can't understand why it would work with the BDM though.&amp;nbsp; What is different in the way the device is brought up with the BDM connected, compared to without it?&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by agreer on &lt;SPAN class="date_text"&gt;2008-03-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;04:27 PM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by agreer on &lt;SPAN class="date_text"&gt;2008-03-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;04:28 PM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by agreer on &lt;SPAN class="date_text"&gt;2008-03-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;04:51 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 23:27:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202546#M16670</guid>
      <dc:creator>agreer</dc:creator>
      <dc:date>2008-03-13T23:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08GB60A - Device initialization following reset with and without BDM</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202547#M16671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;If you are using a P&amp;amp;E BDM, the connection dialog has a button called Hotsync.&lt;BR /&gt;This enters Debug mode without doing a reset.&lt;BR /&gt;&lt;BR /&gt;Try that and look around.&lt;BR /&gt;&lt;BR /&gt;Don't feel bad - you never understand how it could be until you figure it out, then it is totally obvious.&lt;BR /&gt;The times I had this type of problem it was a timing issue that I had over looked.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by JimDon on &lt;SPAN class="date_text"&gt;2008-03-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;12:47 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 23:39:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08GB60A-Device-initialization-following-reset-with-and/m-p/202547#M16671</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-03-13T23:39:40Z</dc:date>
    </item>
  </channel>
</rss>

