<?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>Kinetis MicrocontrollersのトピックRe: frdmk64f ewm driver example gives HardFault when configuring PTE24 to EWM_Out</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/frdmk64f-ewm-driver-example-gives-HardFault-when-configuring/m-p/783736#M47713</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Mark.&amp;nbsp; That's exactly what it needed.&amp;nbsp; I failed to catch that the Pin Tool did create this line...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOCK_EnableClock(kCLOCK_PortE);&amp;nbsp; &amp;nbsp;&amp;nbsp;/* Port E Clock Gate Control: Clock enabled */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Sep 2018 13:57:41 GMT</pubDate>
    <dc:creator>knovinger</dc:creator>
    <dc:date>2018-09-04T13:57:41Z</dc:date>
    <item>
      <title>frdmk64f ewm driver example gives HardFault when configuring PTE24 to EWM_Out</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/frdmk64f-ewm-driver-example-gives-HardFault-when-configuring/m-p/783734#M47711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm playing with the EWM driver example provided with the FRDMK64 SDK for MCUXpresso.&amp;nbsp; The example itself runs fine, but i'm trying to map EWM_Out.&amp;nbsp; I've used MCUXpresso's Pin Tool to generate the code to configure PTE24 to EWM_Out and copy/pasted the generated code into the respective pin_mux.c/.h files included in the board folder of the frdmk64f_ewm project.&amp;nbsp; The project builds fine, but when i run the debugger it halts at the HardFault_Handler.&amp;nbsp; When stepping thru the code, prior to halt, it appears the fault occurs when attempting to configure PTE24.&amp;nbsp; Specifically when the PCR is configured in the Port_SetPinMux function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code generated by Pin Tools...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pin_mux.h **************&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/*! @name PORTE24 (number 31), J2[20]/U8[4]/I2C0_SCL&lt;BR /&gt; @{ */&lt;BR /&gt;#define BOARD_INITPINS_ACCEL_SCL_PORT PORTE /*!&amp;lt;@brief PORT device name: PORTE */&lt;BR /&gt;#define BOARD_INITPINS_ACCEL_SCL_PIN 24U /*!&amp;lt;@brief PORTE pin index: 24 */&lt;BR /&gt; /* @} */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pin_mux.c **************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* PORTE24 (pin 31) is configured as EWM_OUT_b */&lt;BR /&gt; PORT_SetPinMux(BOARD_INITPINS_ACCEL_SCL_PORT, BOARD_INITPINS_ACCEL_SCL_PIN, kPORT_MuxAlt6);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not changed anything else from the default EWM configuration set in the driver example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read something in the K64 Reference Manual about "The pad state is controlled by the EWM_Out signal only after the EWM is enabled by the EWMEN bit of the CTRL register."&amp;nbsp; I don't know if this is just information or if it means the IO pin cannot be configure to EWM_Out until after EWM is enabled.&amp;nbsp; In the driver example, the IO pin is configured prior to EWM being enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing a configuration parameter or sequence somewhere?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2018 14:14:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/frdmk64f-ewm-driver-example-gives-HardFault-when-configuring/m-p/783734#M47711</guid>
      <dc:creator>knovinger</dc:creator>
      <dc:date>2018-08-31T14:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: frdmk64f ewm driver example gives HardFault when configuring PTE24 to EWM_Out</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/frdmk64f-ewm-driver-example-gives-HardFault-when-configuring/m-p/783735#M47712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kevin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try enabling the Port E gate (0x00002000) in SIM_SCGC5 before accessing its configuration register.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;&lt;EM&gt;uTasker - for more performance and faster, cheaper product development&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2018 23:04:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/frdmk64f-ewm-driver-example-gives-HardFault-when-configuring/m-p/783735#M47712</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-08-31T23:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: frdmk64f ewm driver example gives HardFault when configuring PTE24 to EWM_Out</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/frdmk64f-ewm-driver-example-gives-HardFault-when-configuring/m-p/783736#M47713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Mark.&amp;nbsp; That's exactly what it needed.&amp;nbsp; I failed to catch that the Pin Tool did create this line...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOCK_EnableClock(kCLOCK_PortE);&amp;nbsp; &amp;nbsp;&amp;nbsp;/* Port E Clock Gate Control: Clock enabled */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2018 13:57:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/frdmk64f-ewm-driver-example-gives-HardFault-when-configuring/m-p/783736#M47713</guid>
      <dc:creator>knovinger</dc:creator>
      <dc:date>2018-09-04T13:57:41Z</dc:date>
    </item>
  </channel>
</rss>

