<?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>S32KのトピックBlinking_LED_S32DS</title>
    <link>https://community.nxp.com/t5/S32K/Blinking-LED-S32DS/m-p/1130893#M11689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/* ###################################################################&lt;BR /&gt;** Filename : main.c&lt;BR /&gt;** Processor : S32K144_100&lt;BR /&gt;** Abstract :&lt;BR /&gt;** Main module.&lt;BR /&gt;** This module contains user's application code.&lt;BR /&gt;** Settings :&lt;BR /&gt;** Contents :&lt;BR /&gt;** No public methods&lt;BR /&gt;**&lt;BR /&gt;** ###################################################################*/&lt;BR /&gt;/*!&lt;BR /&gt;** @file main.c&lt;BR /&gt;** @version 01.00&lt;BR /&gt;** @brief&lt;BR /&gt;** Main module.&lt;BR /&gt;** This module contains user's application code.&lt;BR /&gt;*/ &lt;BR /&gt;/*!&lt;BR /&gt;** @addtogroup main_module main module documentation&lt;BR /&gt;** @{&lt;BR /&gt;*/ &lt;BR /&gt;/* MODULE main */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Including needed modules to compile this module/procedure */&lt;BR /&gt;#include "Cpu.h"&lt;BR /&gt;#include "pin_mux.h"&lt;BR /&gt;#include "clockMan1.h"&lt;/P&gt;&lt;P&gt;volatile int exit_code = 0;&lt;BR /&gt;/* User includes (#include below this line is not maintained by Processor Expert) */&lt;/P&gt;&lt;P&gt;/*! &lt;BR /&gt; \brief The main function for the project.&lt;BR /&gt; \details The startup initialization sequence is the following:&lt;BR /&gt; * - startup asm routine&lt;BR /&gt; * - main()&lt;BR /&gt;*/&lt;BR /&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt; /* Write your local variable definition here */&lt;BR /&gt; uint32_t cycles;&lt;BR /&gt; uint8_t color;&lt;BR /&gt; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/&lt;BR /&gt; #ifdef PEX_RTOS_INIT&lt;BR /&gt; PEX_RTOS_INIT(); /* Initialization of the selected RTOS. Macro is defined by the RTOS component. */&lt;BR /&gt; #endif&lt;BR /&gt; /*** End of Processor Expert internal initialization. ***/&lt;/P&gt;&lt;P&gt;/* Write your code here */&lt;BR /&gt; CLOCK_SYS_Init(g_clockManConfigsArr,FSL_CLOCK_MANAGER_CONFIG_CNT,g_clockManCallbacksArr,FSL_CLOCK_MANAGER_CALLBACK_CNT);&lt;BR /&gt; CLOCK_SYS_UpdateConfiguration(0,CLOCK_MANAGER_POLICY_FORCIBLE);&lt;/P&gt;&lt;P&gt;GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 15));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 16));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 0));&lt;/P&gt;&lt;P&gt;PINS_DRV_Init(NUM_OF_CONFIGURED_PINS,g_pin_mux_InitConfigArr);&lt;/P&gt;&lt;P&gt;GPIO_HAL_SetPinsDirection(PTD, ((1 &amp;lt;&amp;lt; 15) | (1 &amp;lt;&amp;lt; 16) | (1 &amp;lt;&amp;lt; 0)));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; GPIO_HAL_ClearPins(PTD,(1 &amp;lt;&amp;lt; 15)); /* RED LED ON */&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 15));&lt;BR /&gt; GPIO_HAL_ClearPins(PTD,(1 &amp;lt;&amp;lt; 16)); /* GREEN LED ON */&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 16));&lt;BR /&gt; GPIO_HAL_ClearPins(PTD,(1 &amp;lt;&amp;lt; 0)); /* BLUE LED ON */&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 0));&lt;/P&gt;&lt;P&gt;for(;;) {&lt;BR /&gt; cycles = 3600000;&lt;BR /&gt; while(cycles--);&lt;/P&gt;&lt;P&gt;asm("nop");&lt;BR /&gt; asm("nop");&lt;BR /&gt; asm("nop");&lt;BR /&gt; asm("nop");&lt;BR /&gt; asm("nop");&lt;BR /&gt; asm("nop");&lt;/P&gt;&lt;P&gt;switch(color){&lt;BR /&gt; case 0:&lt;BR /&gt; GPIO_HAL_ClearPins(PTD,(1 &amp;lt;&amp;lt; 15));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 16));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 0));&lt;BR /&gt; break;&lt;BR /&gt; case 1:&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 15));&lt;BR /&gt; GPIO_HAL_ClearPins(PTD,(1 &amp;lt;&amp;lt; 16));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 0));&lt;BR /&gt; break;&lt;BR /&gt; case 2:&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 15));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 16));&lt;BR /&gt; GPIO_HAL_ClearPins(PTD,(1 &amp;lt;&amp;lt; 0));&lt;BR /&gt; color = 255;&lt;BR /&gt;break;&lt;BR /&gt; default:&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 15));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 16));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 0));&lt;BR /&gt; color = 255;&lt;BR /&gt; break;&lt;BR /&gt; }&lt;BR /&gt; ++color;&lt;BR /&gt;// GPIO_HAL_TogglePins(PTD, ((1 &amp;lt;&amp;lt; 15) | (1 &amp;lt;&amp;lt; 16)));&lt;BR /&gt; }&lt;BR /&gt; /* For example: for(;;) { } */&lt;/P&gt;&lt;P&gt;/*** Don't write any code pass this line, or it will be deleted during code generation. ***/&lt;BR /&gt; /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/&lt;BR /&gt; #ifdef PEX_RTOS_START&lt;BR /&gt; PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */&lt;BR /&gt; #endif&lt;BR /&gt; /*** End of RTOS startup code. ***/&lt;BR /&gt; /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/&lt;BR /&gt; for(;;) {&lt;BR /&gt; if(exit_code != 0) {&lt;BR /&gt; break;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; return exit_code;&lt;BR /&gt; /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/&lt;BR /&gt;} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/&lt;/P&gt;&lt;P&gt;/* END main */&lt;BR /&gt;/*!&lt;BR /&gt;** @}&lt;BR /&gt;*/&lt;BR /&gt;/*&lt;BR /&gt;** ###################################################################&lt;BR /&gt;**&lt;BR /&gt;** This file was created by Processor Expert 10.1 [05.21]&lt;BR /&gt;** for the Freescale S32K series of microcontrollers.&lt;BR /&gt;**&lt;BR /&gt;** ###################################################################&lt;BR /&gt;*/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 May 2017 01:36:30 GMT</pubDate>
    <dc:creator>wangj</dc:creator>
    <dc:date>2017-05-09T01:36:30Z</dc:date>
    <item>
      <title>Blinking_LED_S32DS</title>
      <link>https://community.nxp.com/t5/S32K/Blinking-LED-S32DS/m-p/1130893#M11689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/* ###################################################################&lt;BR /&gt;** Filename : main.c&lt;BR /&gt;** Processor : S32K144_100&lt;BR /&gt;** Abstract :&lt;BR /&gt;** Main module.&lt;BR /&gt;** This module contains user's application code.&lt;BR /&gt;** Settings :&lt;BR /&gt;** Contents :&lt;BR /&gt;** No public methods&lt;BR /&gt;**&lt;BR /&gt;** ###################################################################*/&lt;BR /&gt;/*!&lt;BR /&gt;** @file main.c&lt;BR /&gt;** @version 01.00&lt;BR /&gt;** @brief&lt;BR /&gt;** Main module.&lt;BR /&gt;** This module contains user's application code.&lt;BR /&gt;*/ &lt;BR /&gt;/*!&lt;BR /&gt;** @addtogroup main_module main module documentation&lt;BR /&gt;** @{&lt;BR /&gt;*/ &lt;BR /&gt;/* MODULE main */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/* Including needed modules to compile this module/procedure */&lt;BR /&gt;#include "Cpu.h"&lt;BR /&gt;#include "pin_mux.h"&lt;BR /&gt;#include "clockMan1.h"&lt;/P&gt;&lt;P&gt;volatile int exit_code = 0;&lt;BR /&gt;/* User includes (#include below this line is not maintained by Processor Expert) */&lt;/P&gt;&lt;P&gt;/*! &lt;BR /&gt; \brief The main function for the project.&lt;BR /&gt; \details The startup initialization sequence is the following:&lt;BR /&gt; * - startup asm routine&lt;BR /&gt; * - main()&lt;BR /&gt;*/&lt;BR /&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt; /* Write your local variable definition here */&lt;BR /&gt; uint32_t cycles;&lt;BR /&gt; uint8_t color;&lt;BR /&gt; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/&lt;BR /&gt; #ifdef PEX_RTOS_INIT&lt;BR /&gt; PEX_RTOS_INIT(); /* Initialization of the selected RTOS. Macro is defined by the RTOS component. */&lt;BR /&gt; #endif&lt;BR /&gt; /*** End of Processor Expert internal initialization. ***/&lt;/P&gt;&lt;P&gt;/* Write your code here */&lt;BR /&gt; CLOCK_SYS_Init(g_clockManConfigsArr,FSL_CLOCK_MANAGER_CONFIG_CNT,g_clockManCallbacksArr,FSL_CLOCK_MANAGER_CALLBACK_CNT);&lt;BR /&gt; CLOCK_SYS_UpdateConfiguration(0,CLOCK_MANAGER_POLICY_FORCIBLE);&lt;/P&gt;&lt;P&gt;GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 15));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 16));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 0));&lt;/P&gt;&lt;P&gt;PINS_DRV_Init(NUM_OF_CONFIGURED_PINS,g_pin_mux_InitConfigArr);&lt;/P&gt;&lt;P&gt;GPIO_HAL_SetPinsDirection(PTD, ((1 &amp;lt;&amp;lt; 15) | (1 &amp;lt;&amp;lt; 16) | (1 &amp;lt;&amp;lt; 0)));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; GPIO_HAL_ClearPins(PTD,(1 &amp;lt;&amp;lt; 15)); /* RED LED ON */&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 15));&lt;BR /&gt; GPIO_HAL_ClearPins(PTD,(1 &amp;lt;&amp;lt; 16)); /* GREEN LED ON */&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 16));&lt;BR /&gt; GPIO_HAL_ClearPins(PTD,(1 &amp;lt;&amp;lt; 0)); /* BLUE LED ON */&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 0));&lt;/P&gt;&lt;P&gt;for(;;) {&lt;BR /&gt; cycles = 3600000;&lt;BR /&gt; while(cycles--);&lt;/P&gt;&lt;P&gt;asm("nop");&lt;BR /&gt; asm("nop");&lt;BR /&gt; asm("nop");&lt;BR /&gt; asm("nop");&lt;BR /&gt; asm("nop");&lt;BR /&gt; asm("nop");&lt;/P&gt;&lt;P&gt;switch(color){&lt;BR /&gt; case 0:&lt;BR /&gt; GPIO_HAL_ClearPins(PTD,(1 &amp;lt;&amp;lt; 15));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 16));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 0));&lt;BR /&gt; break;&lt;BR /&gt; case 1:&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 15));&lt;BR /&gt; GPIO_HAL_ClearPins(PTD,(1 &amp;lt;&amp;lt; 16));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 0));&lt;BR /&gt; break;&lt;BR /&gt; case 2:&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 15));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 16));&lt;BR /&gt; GPIO_HAL_ClearPins(PTD,(1 &amp;lt;&amp;lt; 0));&lt;BR /&gt; color = 255;&lt;BR /&gt;break;&lt;BR /&gt; default:&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 15));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 16));&lt;BR /&gt; GPIO_HAL_SetPins(PTD,(1 &amp;lt;&amp;lt; 0));&lt;BR /&gt; color = 255;&lt;BR /&gt; break;&lt;BR /&gt; }&lt;BR /&gt; ++color;&lt;BR /&gt;// GPIO_HAL_TogglePins(PTD, ((1 &amp;lt;&amp;lt; 15) | (1 &amp;lt;&amp;lt; 16)));&lt;BR /&gt; }&lt;BR /&gt; /* For example: for(;;) { } */&lt;/P&gt;&lt;P&gt;/*** Don't write any code pass this line, or it will be deleted during code generation. ***/&lt;BR /&gt; /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/&lt;BR /&gt; #ifdef PEX_RTOS_START&lt;BR /&gt; PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */&lt;BR /&gt; #endif&lt;BR /&gt; /*** End of RTOS startup code. ***/&lt;BR /&gt; /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/&lt;BR /&gt; for(;;) {&lt;BR /&gt; if(exit_code != 0) {&lt;BR /&gt; break;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; return exit_code;&lt;BR /&gt; /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/&lt;BR /&gt;} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/&lt;/P&gt;&lt;P&gt;/* END main */&lt;BR /&gt;/*!&lt;BR /&gt;** @}&lt;BR /&gt;*/&lt;BR /&gt;/*&lt;BR /&gt;** ###################################################################&lt;BR /&gt;**&lt;BR /&gt;** This file was created by Processor Expert 10.1 [05.21]&lt;BR /&gt;** for the Freescale S32K series of microcontrollers.&lt;BR /&gt;**&lt;BR /&gt;** ###################################################################&lt;BR /&gt;*/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 01:36:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Blinking-LED-S32DS/m-p/1130893#M11689</guid>
      <dc:creator>wangj</dc:creator>
      <dc:date>2017-05-09T01:36:30Z</dc:date>
    </item>
  </channel>
</rss>

