<?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 NTM88 PARAMETER REGISTER MEMORY ZONE USAGE in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/NTM88-PARAMETER-REGISTER-MEMORY-ZONE-USAGE/m-p/1601473#M15840</link>
    <description>&lt;P&gt;HI.&lt;/P&gt;&lt;P&gt;I'm using an NTM88 eval kit (TPMS88EH11S434) to measure temperature, pressure and acceleration using NTM88_Starter_Project's own main.c code.&lt;/P&gt;&lt;P&gt;In order to save battery I'd like to periodically wake NTM88 up from STOP1 using the PWU interrupt, measure T/P/Accel and send data only once every N measurement cycles or in case that measurements were above given thresholds.&lt;/P&gt;&lt;P&gt;As per document UM11227 "NTM88 family of tire pressure monitor sensors, User manual" (Rev. 7.5)&lt;/P&gt;&lt;P&gt;"The 64 bytes of parameter registers are located at addresses $0050 through $008F.&lt;BR /&gt;The 64 bytes of parameter registers are kept active in all modes of operation as long&lt;BR /&gt;as power is applied to the supply pins. The contents of the parameter registers behave&lt;BR /&gt;like RAM and are unaffected by any reset. Parameter registers may be used to store&lt;BR /&gt;temporary or history data during the times that the MCU is in any of the STOP modes.&lt;BR /&gt;The parameter register at $008F is used by the firmware for interrupt flags."&lt;/P&gt;&lt;P&gt;I understand, thus, that if I want to use any variable in the program I should locate them in the 0x50 - 0x8F area, and so have I declared two UINT8 variables in main.c:&lt;/P&gt;&lt;P&gt;/* Variables to be placed between 0x50 and 0x8F&lt;BR /&gt;we can use 'SHORT_SEG' option to reduce code size as addresses are on one byte */&lt;BR /&gt;#pragma DATA_SEG __SHORT_SEG BATTERY_BACKED_RAM // Section of RAM maintained in STOP1&lt;BR /&gt;#if (AXIS_XZ == NTM88_AVAILABLE_AXES)&lt;BR /&gt;UINT16 gau16UUMA[5u];&lt;BR /&gt;#else&lt;BR /&gt;UINT16 gau16UUMA[4u];&lt;BR /&gt;#endif&lt;BR /&gt;UINT16 gu16FrameCnt;&lt;BR /&gt;UINT32 gu32TireID;&lt;BR /&gt;UINT8 gu8CodeF;&lt;BR /&gt;UINT8 gu8CodeH;&lt;BR /&gt;volatile UINT8 gu8RfInterruptFlag;&lt;BR /&gt;volatile UINT8 cycles_to_TX; //Wait N Cycles before a TX&lt;BR /&gt;volatile UINT8 cycles_measured; //Cycles already measured&lt;/P&gt;&lt;P&gt;From the document I assumed that variables "cycles_to_TX" and "cycles_measured" as declared above would not be reset or initialized after a STOP1 wake up, but that doesn't seem to be the case:&lt;/P&gt;&lt;P&gt;When I set the condition that triggers a data TX in&amp;nbsp; PWU:&lt;/P&gt;&lt;P&gt;(N consecutive PWU with a measurement) OR (certain conditions on P/T/Accel values)&lt;/P&gt;&lt;P&gt;only the conditions upon the values of measurements trigger a TX correctly, but the periodic TX due to PWU cycle count does not happen. I've even tried a simple program that tries to transmit the first N consecutive PWUs with simple "if (cycles_measured &amp;lt; 5)" and "cycles_measured++;" instructions,but it fails miserably and keeps transmitting indefinitely...&lt;/P&gt;&lt;P&gt;What is more, my programs work correctly while in BDM (which makes the NTM88 go into STOP4 instead of STOP1), and I've checked that changing the stop configuration in the main.c code from STOP1 to STOP4 make my programs work perfectly.&lt;/P&gt;&lt;P&gt;Am I missing something? Is data on section 0x50-0x8f somehow changed or altered by some TPMS routine or after STOP1 wake up? I'd prefer to use STOP1 instead of STOP4, in order to save battery power.&lt;/P&gt;&lt;P&gt;Thanks in advance, regards.&lt;/P&gt;&lt;P&gt;Iban&lt;/P&gt;</description>
    <pubDate>Sun, 19 Feb 2023 17:05:39 GMT</pubDate>
    <dc:creator>teleko7</dc:creator>
    <dc:date>2023-02-19T17:05:39Z</dc:date>
    <item>
      <title>NTM88 PARAMETER REGISTER MEMORY ZONE USAGE</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/NTM88-PARAMETER-REGISTER-MEMORY-ZONE-USAGE/m-p/1601473#M15840</link>
      <description>&lt;P&gt;HI.&lt;/P&gt;&lt;P&gt;I'm using an NTM88 eval kit (TPMS88EH11S434) to measure temperature, pressure and acceleration using NTM88_Starter_Project's own main.c code.&lt;/P&gt;&lt;P&gt;In order to save battery I'd like to periodically wake NTM88 up from STOP1 using the PWU interrupt, measure T/P/Accel and send data only once every N measurement cycles or in case that measurements were above given thresholds.&lt;/P&gt;&lt;P&gt;As per document UM11227 "NTM88 family of tire pressure monitor sensors, User manual" (Rev. 7.5)&lt;/P&gt;&lt;P&gt;"The 64 bytes of parameter registers are located at addresses $0050 through $008F.&lt;BR /&gt;The 64 bytes of parameter registers are kept active in all modes of operation as long&lt;BR /&gt;as power is applied to the supply pins. The contents of the parameter registers behave&lt;BR /&gt;like RAM and are unaffected by any reset. Parameter registers may be used to store&lt;BR /&gt;temporary or history data during the times that the MCU is in any of the STOP modes.&lt;BR /&gt;The parameter register at $008F is used by the firmware for interrupt flags."&lt;/P&gt;&lt;P&gt;I understand, thus, that if I want to use any variable in the program I should locate them in the 0x50 - 0x8F area, and so have I declared two UINT8 variables in main.c:&lt;/P&gt;&lt;P&gt;/* Variables to be placed between 0x50 and 0x8F&lt;BR /&gt;we can use 'SHORT_SEG' option to reduce code size as addresses are on one byte */&lt;BR /&gt;#pragma DATA_SEG __SHORT_SEG BATTERY_BACKED_RAM // Section of RAM maintained in STOP1&lt;BR /&gt;#if (AXIS_XZ == NTM88_AVAILABLE_AXES)&lt;BR /&gt;UINT16 gau16UUMA[5u];&lt;BR /&gt;#else&lt;BR /&gt;UINT16 gau16UUMA[4u];&lt;BR /&gt;#endif&lt;BR /&gt;UINT16 gu16FrameCnt;&lt;BR /&gt;UINT32 gu32TireID;&lt;BR /&gt;UINT8 gu8CodeF;&lt;BR /&gt;UINT8 gu8CodeH;&lt;BR /&gt;volatile UINT8 gu8RfInterruptFlag;&lt;BR /&gt;volatile UINT8 cycles_to_TX; //Wait N Cycles before a TX&lt;BR /&gt;volatile UINT8 cycles_measured; //Cycles already measured&lt;/P&gt;&lt;P&gt;From the document I assumed that variables "cycles_to_TX" and "cycles_measured" as declared above would not be reset or initialized after a STOP1 wake up, but that doesn't seem to be the case:&lt;/P&gt;&lt;P&gt;When I set the condition that triggers a data TX in&amp;nbsp; PWU:&lt;/P&gt;&lt;P&gt;(N consecutive PWU with a measurement) OR (certain conditions on P/T/Accel values)&lt;/P&gt;&lt;P&gt;only the conditions upon the values of measurements trigger a TX correctly, but the periodic TX due to PWU cycle count does not happen. I've even tried a simple program that tries to transmit the first N consecutive PWUs with simple "if (cycles_measured &amp;lt; 5)" and "cycles_measured++;" instructions,but it fails miserably and keeps transmitting indefinitely...&lt;/P&gt;&lt;P&gt;What is more, my programs work correctly while in BDM (which makes the NTM88 go into STOP4 instead of STOP1), and I've checked that changing the stop configuration in the main.c code from STOP1 to STOP4 make my programs work perfectly.&lt;/P&gt;&lt;P&gt;Am I missing something? Is data on section 0x50-0x8f somehow changed or altered by some TPMS routine or after STOP1 wake up? I'd prefer to use STOP1 instead of STOP4, in order to save battery power.&lt;/P&gt;&lt;P&gt;Thanks in advance, regards.&lt;/P&gt;&lt;P&gt;Iban&lt;/P&gt;</description>
      <pubDate>Sun, 19 Feb 2023 17:05:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/NTM88-PARAMETER-REGISTER-MEMORY-ZONE-USAGE/m-p/1601473#M15840</guid>
      <dc:creator>teleko7</dc:creator>
      <dc:date>2023-02-19T17:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: NTM88 PARAMETER REGISTER MEMORY ZONE USAGE</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/NTM88-PARAMETER-REGISTER-MEMORY-ZONE-USAGE/m-p/1603192#M15843</link>
      <description>&lt;P&gt;Hello Iban,&lt;/P&gt;
&lt;P&gt;I hope all is great with you. Thank you for using the NXP communities.&lt;/P&gt;
&lt;P&gt;You are correct, the Parameter Registers should be ON in both STOP1 and STOP4 modes.&lt;/P&gt;
&lt;P&gt;Could you please make sure that your variables are stored between $0050 and $008F address?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 21:14:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/NTM88-PARAMETER-REGISTER-MEMORY-ZONE-USAGE/m-p/1603192#M15843</guid>
      <dc:creator>diazmarin09</dc:creator>
      <dc:date>2023-02-21T21:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: NTM88 PARAMETER REGISTER MEMORY ZONE USAGE</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/NTM88-PARAMETER-REGISTER-MEMORY-ZONE-USAGE/m-p/1603573#M15844</link>
      <description>&lt;P&gt;Hi David, I hope all is great with you too, thanks for your fast response.&lt;/P&gt;&lt;P&gt;I've set a breakpoint in main.c (see attached image) to check, and both variables are inside the 0x00 - 0x8F as seen on both the "Variables" and "Dissassembly" windows.&lt;/P&gt;&lt;P&gt;Also, I've added a couple of pictures more ("IF in PWU" and "variables update"), to show the simple way I use these two variables "cycles_measured" and "cycles_to_TX" in the main.c code.&lt;/P&gt;&lt;P&gt;Any suggestion will be welcome.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Iban&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 09:20:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/NTM88-PARAMETER-REGISTER-MEMORY-ZONE-USAGE/m-p/1603573#M15844</guid>
      <dc:creator>teleko7</dc:creator>
      <dc:date>2023-02-22T09:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: NTM88 PARAMETER REGISTER MEMORY ZONE USAGE</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/NTM88-PARAMETER-REGISTER-MEMORY-ZONE-USAGE/m-p/1605411#M15845</link>
      <description>&lt;P&gt;Hello Iban,&lt;/P&gt;
&lt;P&gt;I am pleased to contact you again.&lt;/P&gt;
&lt;P&gt;Please review the response from one of our specialist below:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;The parameter registers are maintained while in STOP1.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If the program does not seem to work out of debug, the first thing that comes to mind is that the part may still be in debug mode. After closing the debug session, disconnect the Multilink from the TPMS board and perform a hardware reset of the board. So, turn off the power supply and turn it on again. It is only after the hardware reset that the part can start in non-debug mode.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If the problem is still there, then my next recommendation is to try programming the Starter Project without any modification. Or, if needed for the receiver to receive the frame, just adjust the RF settings in the function u8InitRf() to match the receiver settings.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;In the original demo project, a 16-bit counter gu16FrameCnt is transmitted in the RF frame. It is stored in the parameter registers, so its value is maintained in STOP1.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="diazmarin09_0-1677258878131.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/212310iD930E6F19800448D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="diazmarin09_0-1677258878131.png" alt="diazmarin09_0-1677258878131.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Customer can check in the RF frames received that the counter value correctly increments at every transmission. If the value was not maintained in STOP1 then the counter would always be 0. &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I hope this information helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 17:14:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/NTM88-PARAMETER-REGISTER-MEMORY-ZONE-USAGE/m-p/1605411#M15845</guid>
      <dc:creator>diazmarin09</dc:creator>
      <dc:date>2023-02-24T17:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: NTM88 PARAMETER REGISTER MEMORY ZONE USAGE</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/NTM88-PARAMETER-REGISTER-MEMORY-ZONE-USAGE/m-p/1606724#M15847</link>
      <description>&lt;P&gt;Hi David.&lt;/P&gt;&lt;P&gt;As suggested, I started from a fresh Startup project and replicated its use of gu16FrameCnt variable (declared my variables right below gu16FrameCnt in the 0x50-0x8F area and managed them only in the interrupt routines). NOw it works perfect.&lt;/P&gt;&lt;P&gt;Many thanks!!!&lt;/P&gt;&lt;P&gt;Iban&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 09:03:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/NTM88-PARAMETER-REGISTER-MEMORY-ZONE-USAGE/m-p/1606724#M15847</guid>
      <dc:creator>teleko7</dc:creator>
      <dc:date>2023-02-28T09:03:21Z</dc:date>
    </item>
  </channel>
</rss>

