<?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: MPC5777C - Central aligned pwm output code snippet in AUTOSAR SW-C</title>
    <link>https://community.nxp.com/t5/AUTOSAR-SW-C/MPC5777C-Central-aligned-pwm-output-code-snippet/m-p/1134117#M22</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/71072"&gt;@narasimhaugra&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Are you trying to achieve this functionality in a Simulink model?&lt;/P&gt;&lt;P&gt;Marius&lt;/P&gt;</description>
    <pubDate>Wed, 02 Sep 2020 10:32:59 GMT</pubDate>
    <dc:creator>mariuslucianand</dc:creator>
    <dc:date>2020-09-02T10:32:59Z</dc:date>
    <item>
      <title>MPC5777C - Central aligned pwm output code snippet</title>
      <link>https://community.nxp.com/t5/AUTOSAR-SW-C/MPC5777C-Central-aligned-pwm-output-code-snippet/m-p/1077214#M13</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;Hi&lt;/P&gt;&lt;P&gt;Can I get the code snippet of thus this task:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Task timer 1 ms&lt;BR /&gt;2. Center aligned PWM Output (2 channels), synchronization at the boundary of each cycle&lt;BR /&gt;3. Input Pulse Measurement : On time and period of each cycle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ugra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2020 19:40:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/AUTOSAR-SW-C/MPC5777C-Central-aligned-pwm-output-code-snippet/m-p/1077214#M13</guid>
      <dc:creator>narasimhaugra</dc:creator>
      <dc:date>2020-08-28T19:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C - Central aligned pwm output code snippet</title>
      <link>https://community.nxp.com/t5/AUTOSAR-SW-C/MPC5777C-Central-aligned-pwm-output-code-snippet/m-p/1134117#M22</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/71072"&gt;@narasimhaugra&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Are you trying to achieve this functionality in a Simulink model?&lt;/P&gt;&lt;P&gt;Marius&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 10:32:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/AUTOSAR-SW-C/MPC5777C-Central-aligned-pwm-output-code-snippet/m-p/1134117#M22</guid>
      <dc:creator>mariuslucianand</dc:creator>
      <dc:date>2020-09-02T10:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C - Central aligned pwm output code snippet</title>
      <link>https://community.nxp.com/t5/AUTOSAR-SW-C/MPC5777C-Central-aligned-pwm-output-code-snippet/m-p/1149708#M23</link>
      <description>&lt;P&gt;Hi Mariusluciananad,&lt;/P&gt;&lt;P&gt;Yes am trying on Simulink&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ugra&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 12:21:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/AUTOSAR-SW-C/MPC5777C-Central-aligned-pwm-output-code-snippet/m-p/1149708#M23</guid>
      <dc:creator>narasimhaugra</dc:creator>
      <dc:date>2020-09-07T12:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C - Central aligned pwm output code snippet</title>
      <link>https://community.nxp.com/t5/AUTOSAR-SW-C/MPC5777C-Central-aligned-pwm-output-code-snippet/m-p/1658686#M48</link>
      <description>&lt;P&gt;This code snippet demonstrates how to configure and use the central-aligned PWM output on the MPC5777C microcontroller. The configurePWM() function sets up the PWM module and channels for central-aligned operation. You can modify the configuration parameters according to your specific requirements.&lt;/P&gt;&lt;P&gt;#include "MPC5777C.h"&lt;/P&gt;&lt;P&gt;// Configure PWM channels for central-aligned operation&lt;BR /&gt;void configurePWM()&lt;BR /&gt;{&lt;BR /&gt;// Enable the PWM module clock&lt;BR /&gt;MC_ME.RUN_PC[0].R = 0x000000FE; // Enable PIT and PWM module clocks&lt;/P&gt;&lt;P&gt;// Configure PWM channel 0&lt;BR /&gt;PWM_0.MCTRL.B.CLK_SEL = 0; // Use the peripheral clock as the PWM timebase&lt;BR /&gt;PWM_0.MCTRL.B.HALF = 0; // Full cycle mode&lt;BR /&gt;PWM_0.CCTRL[0].B.POL = 0; // Output active high&lt;BR /&gt;PWM_0.CCTRL[0].B.CE = 0; // Disable event trigger for PWM channel 0&lt;BR /&gt;PWM_0.FCTRL[0].B.FIE = 0; // Disable fault interrupt for PWM channel 0&lt;BR /&gt;PWM_0.FCTRL[0].B.FSAFE = 0; // Enable immediate fault protection for PWM channel 0&lt;BR /&gt;PWM_0.DTCNT0[0].B.DT = 0; // No dead-time insertion for PWM channel 0&lt;BR /&gt;PWM_0.OUTEN.B.EN_OUT = 1; // Enable the PWM output&lt;/P&gt;&lt;P&gt;// Configure PWM channel 1 (if required)&lt;BR /&gt;// ...&lt;/P&gt;&lt;P&gt;// Configure PWM channel 2 (if required)&lt;BR /&gt;// ...&lt;/P&gt;&lt;P&gt;// Configure other required PWM channels&lt;/P&gt;&lt;P&gt;// Set the period and duty cycle for PWM channel 0&lt;BR /&gt;PWM_0.VAL[0].R = 1000; // Set the period (e.g., 1000 cycles)&lt;BR /&gt;PWM_0.CVAL[0].R = 500; // Set the duty cycle (e.g., 50% duty cycle)&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;// Initialize the microcontroller and other modules&lt;/P&gt;&lt;P&gt;// Configure the PWM channels for central-aligned operation&lt;BR /&gt;configurePWM();&lt;/P&gt;&lt;P&gt;while (1)&lt;BR /&gt;{&lt;BR /&gt;// Main application logic&lt;/P&gt;&lt;P&gt;// Update the duty cycle of the PWM channel if required&lt;BR /&gt;// PWM_0.CVAL[0].R = new_duty_cycle_value;&lt;/P&gt;&lt;P&gt;// Other tasks&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 May 2023 06:33:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/AUTOSAR-SW-C/MPC5777C-Central-aligned-pwm-output-code-snippet/m-p/1658686#M48</guid>
      <dc:creator>Perkinsw436</dc:creator>
      <dc:date>2023-05-27T06:33:19Z</dc:date>
    </item>
  </channel>
</rss>

