<?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>Kinetis Microcontrollers中的主题 Re: VLLS3 wake up,but no reset flow, MK20DX128</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/VLLS3-wake-up-but-no-reset-flow-MK20DX128/m-p/163448#M816</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My fault,sorry&lt;/P&gt;&lt;P&gt;the project was started by another guy that in waiting for a K20 128K&amp;nbsp; uC buided some code for&amp;nbsp; a K20 256K ,&lt;/P&gt;&lt;P&gt;My lack of skill&amp;nbsp; with debug tool aavoided me to notice that some registers were different(MC instead of SMC and so on)&lt;/P&gt;&lt;P&gt;Starting from zero the K20 works correctly,and restarts passing from reset.&lt;/P&gt;&lt;P&gt;checking the System Reset Status Register i can have one more confirmation that the VLLS mode was used .&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Dec 2012 19:30:35 GMT</pubDate>
    <dc:creator>diegocolombo</dc:creator>
    <dc:date>2012-12-20T19:30:35Z</dc:date>
    <item>
      <title>VLLS3 wake up,but no reset flow, MK20DX128</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/VLLS3-wake-up-but-no-reset-flow-MK20DX128/m-p/163447#M815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Hello.Please can i have help, hints&amp;nbsp; or ideas?I'm trying to wake up from vlls3 mode using a switch on a pin, but something goes wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I reduced code at example level to better focus on the problem:after reset 1)initialization2)an easy recognizable 4 seconds square wave is outputted on a pin,3) an infinite loop is entered,where another sequence of different frequency is repeatedly outputted,and the status of a button is polled;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;if pressed ,the vlls3 mode is called,just after&amp;nbsp; the button itself is configured as wakeup trigger source,then the uC goes to sleep in vlls3 mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Resumed code looks like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;void&amp;nbsp; main(void){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wdog_disable();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PE_low_level_init();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TogglePin2KHz_4Sec();&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: #999999;"&gt;//to see it on&amp;nbsp; oscilloscope when it passes through this point,once-only&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;)//infinite loop&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;TogglePin500Hz_1Sec();&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: #999999;"&gt;//to see it on&amp;nbsp; oscilloscope when it passes through this point,repeatedly&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt; if(BUTTON PRESSED) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ..... &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: #999999;"&gt;//prepare Button as wake up trigger event&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt; asm("WFI")&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: #999999;"&gt;//end of if&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: #999999;"&gt;//end of for(;;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: blue;"&gt;}&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: #999999;"&gt;//end of main&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I measure the power consumption by 1 ohm resistor&amp;nbsp; and a digital multimeter with less significative digit representing 0.1uV-&amp;gt;100nA(probably not actually),i tried to follow tips from &lt;STRONG&gt;AN4503 11.1.2 Tips for making low-power measurements on the bench.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I can see current absorption =20 mA in RUN mode,and few uA when&amp;nbsp; i call vlls3,,so i can think to be entered in vlls3.Ok until there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Pushing the button the absorption rises up to 20 mA,typical of RUN mode,but i can't see any square wave on the scope.Where is my program running?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Debugging with Cyclone Max adds hundreds of uA,but that is non the main problem, i can see the debug stopping during vlls3.When,i turn back in RUN mode the debugger appears&amp;nbsp; able to follow the code,but no signal on output pin when code should toggle it.If i check registers inherent&amp;nbsp; to that PORT_PIN they look&amp;nbsp; unchanged,if compared to the previous RUN mode.Is the debug realistic?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Reading the AN4503 at page 31:&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;• VLLSx exits to Run mode through the reset flow.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000;"&gt;• For Kinetis devices, after exit from VLLSx, execution starts with the instruction pointed to by the RESET vector address.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I should expect that the the code starts from RESET,initializing stack pointer,global variables etc.It is my expectation wrong?&lt;/P&gt;&lt;P&gt;In code examples i found that at least GPIO iniatilization is done in wake up ISR,so i done(see attached file).&lt;/P&gt;&lt;P&gt;Thanks for your attention,&lt;/P&gt;&lt;P&gt;Diego.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337493"&gt;Test_VLLS3.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 14:34:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/VLLS3-wake-up-but-no-reset-flow-MK20DX128/m-p/163447#M815</guid>
      <dc:creator>diegocolombo</dc:creator>
      <dc:date>2012-11-05T14:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: VLLS3 wake up,but no reset flow, MK20DX128</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/VLLS3-wake-up-but-no-reset-flow-MK20DX128/m-p/163448#M816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My fault,sorry&lt;/P&gt;&lt;P&gt;the project was started by another guy that in waiting for a K20 128K&amp;nbsp; uC buided some code for&amp;nbsp; a K20 256K ,&lt;/P&gt;&lt;P&gt;My lack of skill&amp;nbsp; with debug tool aavoided me to notice that some registers were different(MC instead of SMC and so on)&lt;/P&gt;&lt;P&gt;Starting from zero the K20 works correctly,and restarts passing from reset.&lt;/P&gt;&lt;P&gt;checking the System Reset Status Register i can have one more confirmation that the VLLS mode was used .&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 19:30:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/VLLS3-wake-up-but-no-reset-flow-MK20DX128/m-p/163448#M816</guid>
      <dc:creator>diegocolombo</dc:creator>
      <dc:date>2012-12-20T19:30:35Z</dc:date>
    </item>
  </channel>
</rss>

