<?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>Other NXP ProductsのトピックRe: NHS3152 16 bit Timer PWM</title>
    <link>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1267347#M10957</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/86938"&gt;@mario_castaneda&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Hope you are fine.&lt;/P&gt;&lt;P&gt;Did you find something about the pwm low frequency, please ?&lt;/P&gt;&lt;P&gt;Thank you for your support.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Apr 2021 15:19:27 GMT</pubDate>
    <dc:creator>VitoDes</dc:creator>
    <dc:date>2021-04-23T15:19:27Z</dc:date>
    <item>
      <title>NHS3152 16 bit Timer PWM</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1231055#M10442</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I tried to use the 16 bit timer as PWM generator on NHS3152 chip with CT16_M0 and M1 pins and it seems that the highest frequency reached is only 30Hz when the system clock is 2MHz and the timer prescaler is set to 0.&lt;/P&gt;&lt;P&gt;I also tried to set the the system clock to 8MHz and the PWM reach 120Hz (logically), whiwh is still too slow for our application.&lt;/P&gt;&lt;P&gt;Is there any advice on how to increase the frequency, or did I make something wrong in the program ?&lt;/P&gt;&lt;P&gt;Here is the simple code implemented :&lt;/P&gt;&lt;P&gt;Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_3, IOCON_FUNC_1);&lt;BR /&gt;Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_7, IOCON_FUNC_1);&lt;/P&gt;&lt;P&gt;Chip_TIMER16_0_Init();&lt;/P&gt;&lt;P&gt;Chip_TIMER_PrescaleSet(NSS_TIMER16_0, 0);&lt;/P&gt;&lt;P&gt;Chip_TIMER_SetMatch(NSS_TIMER16_0, 0, 20000);&lt;BR /&gt;Chip_TIMER_MatchDisableInt(NSS_TIMER16_0, 0);&lt;BR /&gt;Chip_TIMER_StopOnMatchDisable(NSS_TIMER16_0, 0);&lt;BR /&gt;Chip_TIMER_ResetOnMatchDisable(NSS_TIMER16_0, 0);&lt;/P&gt;&lt;P&gt;Chip_TIMER_SetMatch(NSS_TIMER16_0, 1, 40000);&amp;nbsp;&lt;BR /&gt;Chip_TIMER_MatchDisableInt(NSS_TIMER16_0, 1);&lt;BR /&gt;Chip_TIMER_StopOnMatchDisable(NSS_TIMER16_0, 1);&lt;BR /&gt;Chip_TIMER_ResetOnMatchDisable(NSS_TIMER16_0, 1);&lt;/P&gt;&lt;P&gt;Chip_TIMER_SetMatchOutputMode(NSS_TIMER16_0, 0, TIMER_MATCH_OUTPUT_PWM);&lt;BR /&gt;Chip_TIMER_SetMatchOutputMode(NSS_TIMER16_0, 1, TIMER_MATCH_OUTPUT_PWM);&lt;BR /&gt;Chip_TIMER_Reset(NSS_TIMER16_0);&lt;BR /&gt;Chip_TIMER_Enable(NSS_TIMER16_0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 15:51:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1231055#M10442</guid>
      <dc:creator>VitoDes</dc:creator>
      <dc:date>2021-02-15T15:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: NHS3152 16 bit Timer PWM</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1231743#M10456</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183467"&gt;@VitoDes&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Please look at the comments below.&lt;/P&gt;
&lt;P&gt;/* - The timer frequency is derived from the system clock frequency.&lt;BR /&gt;* - A prescaler value of n will result in a divider of (n+1)&lt;BR /&gt;* Set the timer to tick very slow - accuracy is not a concern here.&lt;BR /&gt;* A large prescaler value that still gives a couple of units at the slowest system clock frequency is chosen:&lt;BR /&gt;* 2**13 - 1. This gives 7 ticks per second @62.5kHz, 61 ticks @500kHz, 976 @8MHz.&lt;BR /&gt;*/&lt;BR /&gt;Chip_TIMER_PrescaleSet(NSS_TIMER16_0, (1&amp;lt;&amp;lt;13) - 1);&lt;/P&gt;
&lt;P&gt;Could you please try to pass an argument as 1?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 22:31:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1231743#M10456</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2021-02-16T22:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: NHS3152 16 bit Timer PWM</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1231941#M10462</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/86938"&gt;@mario_castaneda&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for your answer, I was aware about this comments and I've already tried to PrescaleSet to 1 which gave me a 15Hz frenquency, as well as agument 10 gave 3Hz PWM. That's why I tried to set prescaler to 0 to have the maximum frequency. Everything looks consistent with a nominal frequency of 30Hz.&lt;/P&gt;&lt;P&gt;The same way I tried the command :&lt;/P&gt;&lt;P&gt;Chip_TIMER_PrescaleSet(NSS_TIMER16_0, ((uint32_t)Chip_Clock_System_GetClockFreq() / 250) - 1);&lt;/P&gt;&lt;P&gt;found in the timer_nss_example_3, didn't set a 250Hz PWM as it should.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your support.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 08:53:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1231941#M10462</guid>
      <dc:creator>VitoDes</dc:creator>
      <dc:date>2021-02-17T08:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: NHS3152 16 bit Timer PWM</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1233084#M10480</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183467"&gt;@VitoDes&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I hope you are doing great.&lt;/P&gt;
&lt;P&gt;Just to confirm, both pins are getting a low frequency?&lt;/P&gt;
&lt;P&gt;Did you check the note that is the reference manual 15.9.10? what is the value of your MCR is set as logic 0?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 18:31:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1233084#M10480</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2021-02-18T18:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: NHS3152 16 bit Timer PWM</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1240397#M10533</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/86938"&gt;@mario_castaneda&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Hope you are fine, sorry for the late answer.&lt;/P&gt;&lt;P&gt;Both pins are the same frequency and have exactly the same beahviour.&lt;/P&gt;&lt;P&gt;I've read the 15.9.10 section and the MCR is set as logic 0 the same as the MR registers are setted with the good values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have just a question about the note in 15.9.10 section, it says that the MCR must be set to logic 0 in order to disable the reset and the stop on match and just after it says to set the MRR bit to logic 1 in order to enable the timer reset. But this operation does not allow to control the width of the pulse.&lt;/P&gt;&lt;P&gt;Is there a part of the code I am missing ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 16:49:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1240397#M10533</guid>
      <dc:creator>VitoDes</dc:creator>
      <dc:date>2021-03-04T16:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: NHS3152 16 bit Timer PWM</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1267347#M10957</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/86938"&gt;@mario_castaneda&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Hope you are fine.&lt;/P&gt;&lt;P&gt;Did you find something about the pwm low frequency, please ?&lt;/P&gt;&lt;P&gt;Thank you for your support.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 15:19:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/NHS3152-16-bit-Timer-PWM/m-p/1267347#M10957</guid>
      <dc:creator>VitoDes</dc:creator>
      <dc:date>2021-04-23T15:19:27Z</dc:date>
    </item>
  </channel>
</rss>

