<?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>8-bit Microcontrollers中的主题 FXTH87 debugging and code problems</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/FXTH87-debugging-and-code-problems/m-p/693481#M22442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am checking&amp;nbsp;the FXTH87 for TPMS application. I dowloaded the codewarrior software &lt;A href="http://www.nxp.com/products/automotive-products/sensors/pressure-sensors-for-automotive/tire-pressure-monitoring-sensors/fxth87-tire-pressure-monitor-sensor-family:FXTH87?tab=Design_Tools_Tab"&gt;here&lt;/A&gt;&amp;nbsp;that works with the kinetis receiver but I have a hard time understanding some details in the program of the FXTH87. Maybe you can help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) First off, I configured the user configuration header file to wake up the FXTH87 each 1 second and send a frame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;In the main program there is a &lt;STRONG&gt;if(CLEAR=SPMSC2_PDF)&lt;/STRONG&gt; condition. As I understand it, we should enter in this block only if we did not wakeup from an interrupt so I guess just the first time I run the program it is going to go in this loop and then it will avoid it (it seems to be the loop in which is implemented some kind of setup like setting up the state machine,...). The thing I don't understand is when I debug, it gets until the last line of the main&amp;nbsp;&lt;STRONG&gt;for(;;)&lt;/STRONG&gt; loop instruction which is &lt;STRONG&gt;asm stop&lt;/STRONG&gt;&amp;nbsp;and than goes back in the &lt;STRONG&gt;if(CLEAR=SPMSC2_PDF) &lt;/STRONG&gt;block&amp;nbsp;but in my opinion it should go in the &lt;STRONG&gt;else{}&lt;/STRONG&gt;&amp;nbsp;afterwords. In particular it never goes into the PWU interrupt even though I am in the noLF_PWU mode and that I put a breakpoint in the PWU interruption (I know I can use just one breakpoint and I have putted just one). Isn't this weird?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="breakpointInPWUInterruption.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/9192i880FFA0CB741A001/image-size/large?v=v2&amp;amp;px=999" role="button" title="breakpointInPWUInterruption.PNG" alt="breakpointInPWUInterruption.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) When I use the FXTH87 in the PWU 1 second waiting mode, and I send&amp;nbsp;1 frame, the following always happen:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If I hit the debug button and then hit the stop button and do a manual reset of the sensor I receive one packet per second which is correct.&lt;/P&gt;&lt;P&gt;But If I hit the debug button and then hit the run button, I receive a few hundred of packets in a few seconds even though in my opinion I should again receive 1 packet per second. Why is that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) In the &lt;A href="http://cache.nxp.com/docs/en/reference-manual/FXTH87EDRM.pdf"&gt;design reference&lt;/A&gt;&amp;nbsp;at page 24 they say&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;The signal frequency for both axes increases with the speed. Due to the sensitivity of the sensor, some very simple algorithms allow to differentiate the parking from the motion state.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Does this mean there is a possibility of transmitting only if the car is in motion? For this, should we measure the frequency of the &lt;STRONG&gt;x_accel&lt;/STRONG&gt; signal? are there some firmware function that does this? What is the way to do this and consuming minimum current?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Often, when I look at the frame stack, there is a function under the main, so I guess it is a function calling the main function which is called 10xA9A6 (0xA9A6)(). What is this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="stackFrame.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/9030iE208731BB8518D87/image-size/large?v=v2&amp;amp;px=999" role="button" title="stackFrame.PNG" alt="stackFrame.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) Often, when I run the code and I randomly hit the pause button, it goes into the part of the memory we can't view E721. I have looked the addresses of the firmware functions in the datasheet but none of them have this specific adress. What is this adress? Why do I always fall into it? Is it the interruption vector for the RF interruption?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="E721.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/9150i379D695D5FA5A1A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="E721.PNG" alt="E721.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Aug 2017 21:21:32 GMT</pubDate>
    <dc:creator>alickaufmann</dc:creator>
    <dc:date>2017-08-03T21:21:32Z</dc:date>
    <item>
      <title>FXTH87 debugging and code problems</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/FXTH87-debugging-and-code-problems/m-p/693481#M22442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am checking&amp;nbsp;the FXTH87 for TPMS application. I dowloaded the codewarrior software &lt;A href="http://www.nxp.com/products/automotive-products/sensors/pressure-sensors-for-automotive/tire-pressure-monitoring-sensors/fxth87-tire-pressure-monitor-sensor-family:FXTH87?tab=Design_Tools_Tab"&gt;here&lt;/A&gt;&amp;nbsp;that works with the kinetis receiver but I have a hard time understanding some details in the program of the FXTH87. Maybe you can help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) First off, I configured the user configuration header file to wake up the FXTH87 each 1 second and send a frame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;In the main program there is a &lt;STRONG&gt;if(CLEAR=SPMSC2_PDF)&lt;/STRONG&gt; condition. As I understand it, we should enter in this block only if we did not wakeup from an interrupt so I guess just the first time I run the program it is going to go in this loop and then it will avoid it (it seems to be the loop in which is implemented some kind of setup like setting up the state machine,...). The thing I don't understand is when I debug, it gets until the last line of the main&amp;nbsp;&lt;STRONG&gt;for(;;)&lt;/STRONG&gt; loop instruction which is &lt;STRONG&gt;asm stop&lt;/STRONG&gt;&amp;nbsp;and than goes back in the &lt;STRONG&gt;if(CLEAR=SPMSC2_PDF) &lt;/STRONG&gt;block&amp;nbsp;but in my opinion it should go in the &lt;STRONG&gt;else{}&lt;/STRONG&gt;&amp;nbsp;afterwords. In particular it never goes into the PWU interrupt even though I am in the noLF_PWU mode and that I put a breakpoint in the PWU interruption (I know I can use just one breakpoint and I have putted just one). Isn't this weird?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="breakpointInPWUInterruption.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/9192i880FFA0CB741A001/image-size/large?v=v2&amp;amp;px=999" role="button" title="breakpointInPWUInterruption.PNG" alt="breakpointInPWUInterruption.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) When I use the FXTH87 in the PWU 1 second waiting mode, and I send&amp;nbsp;1 frame, the following always happen:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If I hit the debug button and then hit the stop button and do a manual reset of the sensor I receive one packet per second which is correct.&lt;/P&gt;&lt;P&gt;But If I hit the debug button and then hit the run button, I receive a few hundred of packets in a few seconds even though in my opinion I should again receive 1 packet per second. Why is that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) In the &lt;A href="http://cache.nxp.com/docs/en/reference-manual/FXTH87EDRM.pdf"&gt;design reference&lt;/A&gt;&amp;nbsp;at page 24 they say&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;The signal frequency for both axes increases with the speed. Due to the sensitivity of the sensor, some very simple algorithms allow to differentiate the parking from the motion state.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Does this mean there is a possibility of transmitting only if the car is in motion? For this, should we measure the frequency of the &lt;STRONG&gt;x_accel&lt;/STRONG&gt; signal? are there some firmware function that does this? What is the way to do this and consuming minimum current?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Often, when I look at the frame stack, there is a function under the main, so I guess it is a function calling the main function which is called 10xA9A6 (0xA9A6)(). What is this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="stackFrame.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/9030iE208731BB8518D87/image-size/large?v=v2&amp;amp;px=999" role="button" title="stackFrame.PNG" alt="stackFrame.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) Often, when I run the code and I randomly hit the pause button, it goes into the part of the memory we can't view E721. I have looked the addresses of the firmware functions in the datasheet but none of them have this specific adress. What is this adress? Why do I always fall into it? Is it the interruption vector for the RF interruption?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="E721.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/9150i379D695D5FA5A1A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="E721.PNG" alt="E721.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2017 21:21:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/FXTH87-debugging-and-code-problems/m-p/693481#M22442</guid>
      <dc:creator>alickaufmann</dc:creator>
      <dc:date>2017-08-03T21:21:32Z</dc:date>
    </item>
  </channel>
</rss>

