<?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: MCUXpresso in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1841633#M66259</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;This is the pin assignment of KL16 with 64 pin LQFP&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1712456607272.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/272294i78F510EC928E4876/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1712456607272.png" alt="xiangjun_rong_0-1712456607272.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is the pin mux register&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_1-1712456933134.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/272295i724C3ED5873FB1A4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_1-1712456933134.png" alt="xiangjun_rong_1-1712456933134.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the procedure to configure pins:&lt;/P&gt;
&lt;P&gt;1)enable PORTB gated clock&lt;/P&gt;
&lt;P&gt;SIM-&amp;gt;SCGC5|=1&amp;lt;&amp;lt;10|1&amp;lt;&amp;lt;9;&lt;/P&gt;
&lt;P&gt;2)configure the Pin35 and Pin36 as I2C0 pins as ALT2&lt;/P&gt;
&lt;P&gt;PORTB_0:&lt;/P&gt;
&lt;P&gt;PORTB-&amp;gt;PCR[0]&amp;amp;=~(7&amp;lt;&amp;lt;8);&lt;/P&gt;
&lt;P&gt;PORTB-&amp;gt;PCR[0]|=(2&amp;lt;&amp;lt;8);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PORTB_1:&lt;/P&gt;
&lt;P&gt;PORTB-&amp;gt;PCR[1]&amp;amp;=~(7&amp;lt;&amp;lt;8);&lt;/P&gt;
&lt;P&gt;PORTB-&amp;gt;PCR[1]|=(2&amp;lt;&amp;lt;8);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the PTB0/PTB1 will function as I2C0 pins.&lt;/P&gt;
&lt;P&gt;I do not see your code, pls check above description.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 07 Apr 2024 02:44:18 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2024-04-07T02:44:18Z</dc:date>
    <item>
      <title>MCUXpresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1841505#M66256</link>
      <description>&lt;P&gt;I am using a FRDM-KL26Z128 eval board to develop a new product which I have built on a separate PCB. (mainly I2C, SPI and GPIO). To test my add-on hardware I am using a demo application - eCompass. I am using the PIN tool to configure the pins - &amp;nbsp;2 for the UART (no change and no problem) and 2 for the I2C. The original app uses I2C0 on pins 20 and 21 and I want to use pins 35 and 36. The pins 20 and 21 do not appear on the Routing Details table if I select &lt;EM&gt;BOARD_Init_Pins&lt;/EM&gt;, but they are the only entries on&amp;nbsp;Routing Details table when I select&amp;nbsp;&lt;EM&gt;BOARD_I2C_ConfigurePins.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Looking at&lt;EM&gt; pin_mux.c &amp;nbsp;&lt;/EM&gt;function&amp;nbsp;&lt;EM&gt;&lt;SPAN&gt;BOARD_I2C_ConfigurePins(&lt;/SPAN&gt;&lt;SPAN&gt;void&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN&gt;showed that pins 20 and 21 were configured for I2C0 with about 6 lines of code for each pin, but there was no entry for Pins 35 and 36, although I selected them on the pin list and then deleted pins 20 and 21 from the pin list. Now pins 35 and 36 appear in the Routing Ddetails list for both &lt;EM&gt;BOARD_Init_Pins and&amp;nbsp;BOARD_I2C_ConfigurePins.&lt;/EM&gt;&amp;nbsp;They also now appear in&amp;nbsp;function&lt;EM&gt;BOARD_I2C_ConfigurePins(void) but with only one line of code&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You will probably realise that my experience with MCUXpresso is somewhat limited and I would like to know why there are differences between the old &amp;nbsp;and new I2C0&amp;nbsp;&lt;/SPAN&gt;configurations (apart from the pin allocations)&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 21:48:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1841505#M66256</guid>
      <dc:creator>juliancox</dc:creator>
      <dc:date>2024-04-05T21:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1841633#M66259</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;This is the pin assignment of KL16 with 64 pin LQFP&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1712456607272.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/272294i78F510EC928E4876/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1712456607272.png" alt="xiangjun_rong_0-1712456607272.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This is the pin mux register&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_1-1712456933134.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/272295i724C3ED5873FB1A4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_1-1712456933134.png" alt="xiangjun_rong_1-1712456933134.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the procedure to configure pins:&lt;/P&gt;
&lt;P&gt;1)enable PORTB gated clock&lt;/P&gt;
&lt;P&gt;SIM-&amp;gt;SCGC5|=1&amp;lt;&amp;lt;10|1&amp;lt;&amp;lt;9;&lt;/P&gt;
&lt;P&gt;2)configure the Pin35 and Pin36 as I2C0 pins as ALT2&lt;/P&gt;
&lt;P&gt;PORTB_0:&lt;/P&gt;
&lt;P&gt;PORTB-&amp;gt;PCR[0]&amp;amp;=~(7&amp;lt;&amp;lt;8);&lt;/P&gt;
&lt;P&gt;PORTB-&amp;gt;PCR[0]|=(2&amp;lt;&amp;lt;8);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PORTB_1:&lt;/P&gt;
&lt;P&gt;PORTB-&amp;gt;PCR[1]&amp;amp;=~(7&amp;lt;&amp;lt;8);&lt;/P&gt;
&lt;P&gt;PORTB-&amp;gt;PCR[1]|=(2&amp;lt;&amp;lt;8);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the PTB0/PTB1 will function as I2C0 pins.&lt;/P&gt;
&lt;P&gt;I do not see your code, pls check above description.&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Apr 2024 02:44:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1841633#M66259</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-04-07T02:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1843385#M66269</link>
      <description>&lt;P&gt;Since my first post I changed the I2C pins to 53 and 54 (it makes connection to my hardware a little easier. when I tested it there was no activity neither pin. When I allocated the new pins they appeared in the BOARD_I2C_ConfigurePins table, but after I "updated the code" they also appeared in the&amp;nbsp;&amp;nbsp;BOARD_InitPins table. Below is a copy of pin_mux.c taken from the code windowing the "Pins" perspective.&lt;/P&gt;&lt;P&gt;/***********************************************************************************************************************&lt;BR /&gt;* This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file&lt;BR /&gt;* will be overwritten if the respective MCUXpresso Config Tools is used to update this file.&lt;BR /&gt;**********************************************************************************************************************/&lt;/P&gt;&lt;P&gt;/* clang-format off */&lt;BR /&gt;/*&lt;BR /&gt;* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************&lt;BR /&gt;!!GlobalInfo&lt;BR /&gt;product: Pins v15.0&lt;BR /&gt;processor: MKL26Z128xxx4&lt;BR /&gt;package_id: MKL26Z128VLH4&lt;BR /&gt;mcu_data: ksdk2_0&lt;BR /&gt;processor_version: 13.0.1&lt;BR /&gt;board: FRDM-KL26Z&lt;BR /&gt;* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********&lt;BR /&gt;*/&lt;BR /&gt;/* clang-format on */&lt;/P&gt;&lt;P&gt;#include "fsl_common.h"&lt;BR /&gt;#include "fsl_port.h"&lt;BR /&gt;#include "pin_mux.h"&lt;/P&gt;&lt;P&gt;/* FUNCTION ************************************************************************************************************&lt;BR /&gt;*&lt;BR /&gt;* Function Name : BOARD_InitBootPins&lt;BR /&gt;* Description : Calls initialization functions.&lt;BR /&gt;*&lt;BR /&gt;* END ****************************************************************************************************************/&lt;BR /&gt;void BOARD_InitBootPins(void)&lt;BR /&gt;{&lt;BR /&gt;BOARD_InitPins();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* clang-format off */&lt;BR /&gt;/*&lt;BR /&gt;* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************&lt;BR /&gt;BOARD_InitPins:&lt;BR /&gt;- options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}&lt;BR /&gt;- pin_list:&lt;BR /&gt;- {pin_num: '23', peripheral: UART0, signal: RX, pin_signal: TSI0_CH2/PTA1/UART0_RX/TPM2_CH0}&lt;BR /&gt;- {pin_num: '24', peripheral: UART0, signal: TX, pin_signal: TSI0_CH3/PTA2/UART0_TX/TPM2_CH1, direction: OUTPUT}&lt;BR /&gt;- {pin_num: '53', peripheral: I2C0, signal: SCL, pin_signal: CMP0_IN2/PTC8/I2C0_SCL/TPM0_CH4/I2S0_MCLK}&lt;BR /&gt;- {pin_num: '54', peripheral: I2C0, signal: SDA, pin_signal: CMP0_IN3/PTC9/I2C0_SDA/TPM0_CH5/I2S0_RX_BCLK}&lt;BR /&gt;* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********&lt;BR /&gt;*/&lt;BR /&gt;/* clang-format on */&lt;/P&gt;&lt;P&gt;/* FUNCTION ************************************************************************************************************&lt;BR /&gt;*&lt;BR /&gt;* Function Name : BOARD_InitPins&lt;BR /&gt;* Description : Configures pin routing and optionally pin electrical features.&lt;BR /&gt;*&lt;BR /&gt;* END ****************************************************************************************************************/&lt;BR /&gt;void BOARD_InitPins(void)&lt;BR /&gt;{&lt;BR /&gt;/* Port A Clock Gate Control: Clock enabled */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_PortA);&lt;BR /&gt;/* Port C Clock Gate Control: Clock enabled */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_PortC);&lt;/P&gt;&lt;P&gt;/* PORTA1 (pin 23) is configured as UART0_RX */&lt;BR /&gt;PORT_SetPinMux(BOARD_INITPINS_DEBUG_UART_RX_PORT, BOARD_INITPINS_DEBUG_UART_RX_PIN, kPORT_MuxAlt2);&lt;/P&gt;&lt;P&gt;/* PORTA2 (pin 24) is configured as UART0_TX */&lt;BR /&gt;PORT_SetPinMux(BOARD_INITPINS_DEBUG_UART_TX_PORT, BOARD_INITPINS_DEBUG_UART_TX_PIN, kPORT_MuxAlt2);&lt;/P&gt;&lt;P&gt;/* PORTC8 (pin 53) is configured as I2C0_SCL */&lt;BR /&gt;PORT_SetPinMux(PORTC, 8U, kPORT_MuxAlt2);&lt;/P&gt;&lt;P&gt;/* PORTC9 (pin 54) is configured as I2C0_SDA */&lt;BR /&gt;PORT_SetPinMux(PORTC, 9U, kPORT_MuxAlt2);&lt;/P&gt;&lt;P&gt;SIM-&amp;gt;SOPT5 = ((SIM-&amp;gt;SOPT5 &amp;amp;&lt;BR /&gt;/* Mask bits to zero which are setting */&lt;BR /&gt;(~(SIM_SOPT5_UART0TXSRC_MASK | SIM_SOPT5_UART0RXSRC_MASK)))&lt;/P&gt;&lt;P&gt;/* UART0 Transmit Data Source Select: UART0_TX pin. */&lt;BR /&gt;| SIM_SOPT5_UART0TXSRC(SOPT5_UART0TXSRC_UART_TX)&lt;/P&gt;&lt;P&gt;/* UART0 Receive Data Source Select: UART_RX pin. */&lt;BR /&gt;| SIM_SOPT5_UART0RXSRC(SOPT5_UART0RXSRC_UART_RX));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* clang-format off */&lt;BR /&gt;/*&lt;BR /&gt;* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************&lt;BR /&gt;BOARD_I2C_ConfigurePins:&lt;BR /&gt;- options: {coreID: core0, enableClock: 'true'}&lt;BR /&gt;- pin_list:&lt;BR /&gt;- {pin_num: '53', peripheral: I2C0, signal: SCL, pin_signal: CMP0_IN2/PTC8/I2C0_SCL/TPM0_CH4/I2S0_MCLK}&lt;BR /&gt;- {pin_num: '54', peripheral: I2C0, signal: SDA, pin_signal: CMP0_IN3/PTC9/I2C0_SDA/TPM0_CH5/I2S0_RX_BCLK}&lt;BR /&gt;* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********&lt;BR /&gt;*/&lt;BR /&gt;/* clang-format on */&lt;/P&gt;&lt;P&gt;/* FUNCTION ************************************************************************************************************&lt;BR /&gt;*&lt;BR /&gt;* Function Name : BOARD_I2C_ConfigurePins&lt;BR /&gt;* Description : Configures pin routing and optionally pin electrical features.&lt;BR /&gt;*&lt;BR /&gt;* END ****************************************************************************************************************/&lt;BR /&gt;void BOARD_I2C_ConfigurePins(void)&lt;BR /&gt;{&lt;BR /&gt;/* Port C Clock Gate Control: Clock enabled */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_PortC);&lt;/P&gt;&lt;P&gt;/* PORTC8 (pin 53) is configured as I2C0_SCL */&lt;BR /&gt;PORT_SetPinMux(PORTC, 8U, kPORT_MuxAlt2);&lt;/P&gt;&lt;P&gt;/* PORTC9 (pin 54) is configured as I2C0_SDA */&lt;BR /&gt;PORT_SetPinMux(PORTC, 9U, kPORT_MuxAlt2);&lt;BR /&gt;}&lt;BR /&gt;/***********************************************************************************************************************&lt;BR /&gt;* EOF&lt;/P&gt;&lt;P&gt;I have also attached the pin_mux.c file from the Project/Board folder. It did not reflect ant of the changes that I had made in the "pins" config tool so I edited it to reflect the changed pin allocation. Why are there two Pin_mux.c files (the two pin_mux.h files are also different).&lt;/P&gt;&lt;P&gt;Referring to the pin configuration code you gave me - Where do I put them and will they conflict with (either of) Pin_mux.c?&lt;/P&gt;&lt;P&gt;This problem is really getting me down.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 20:49:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1843385#M66269</guid>
      <dc:creator>juliancox</dc:creator>
      <dc:date>2024-04-09T20:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1843577#M66270</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;From pin assignment, I suppose that the following code is okay to configure the PTC8/8 as I2C0 pins, after you configure PTC8/9 as I2C pins, they are open drain automatically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From hardware perspective, I have checked the FRDM-KL26Z schematics, the PTC8/9 are connected to the pin14/16 of J1 without connected to the other IC, you should connect pull-up resistor on the two pins and connect them to an I2C slave device, because I2C slave device is required to give ACK signal when slave device has received matched address.&lt;/P&gt;
&lt;P&gt;void BOARD_I2C_ConfigurePins(void)&lt;BR /&gt;{&lt;BR /&gt;/* Port C Clock Gate Control: Clock enabled */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_PortC);&lt;/P&gt;
&lt;P&gt;/* PORTC8 (pin 53) is configured as I2C0_SCL */&lt;BR /&gt;PORT_SetPinMux(PORTC, 8U, kPORT_MuxAlt2);&lt;/P&gt;
&lt;P&gt;/* PORTC9 (pin 54) is configured as I2C0_SDA */&lt;BR /&gt;PORT_SetPinMux(PORTC, 9U, kPORT_MuxAlt2);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 04:53:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1843577#M66270</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-04-10T04:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1843781#M66273</link>
      <description>&lt;P&gt;please allow me to clarify two points:&lt;/P&gt;&lt;P&gt;1. I have the two pull-ups and the master will send out an address. If the address does not match any slave device it will not receive an ACK and the activity will terminate. However, there is no activity on the I2C output pins, but there should be AT LEAST 8 clock pulses and 8 address pulses (assuming that no slave responds).&lt;/P&gt;&lt;P&gt;2. When I look at pin_mux.c using the "Pins" config tool it shows: -&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;void&lt;/SPAN&gt;&lt;SPAN&gt; BOARD_I2C_ConfigurePins(&lt;/SPAN&gt;&lt;SPAN&gt;void&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* Port C Clock Gate Control: Clock enabled */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CLOCK_EnableClock(kCLOCK_PortC);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* PORTC8 (pin 53) is configured as I2C0_SCL */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;PORT_SetPinMux(PORTC, 8U, kPORT_MuxAlt2);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* PORTC9 (pin 54) is configured as I2C0_SDA */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;PORT_SetPinMux(PORTC, 9U, kPORT_MuxAlt2);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;but when I open pin_mux.c from the project explorer window I get a different result:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;&lt;EM&gt;void BOARD_I2C_ConfigurePins(void) {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CLOCK_EnableClock(kCLOCK_PortE); /* Port E Clock Gate Control: Clock enabled */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;const port_pin_config_t portc8_pin53_config = {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;kPORT_PullUp, /* Internal pull-up resistor is enabled */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;kPORT_SlowSlewRate, /* Slow slew rate is configured */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;kPORT_PassiveFilterDisable, /* Passive filter is disabled */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;kPORT_LowDriveStrength, /* Low drive strength is configured */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;kPORT_MuxAlt2, /* Pin is configured as I2C0_SCL */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;};&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;PORT_SetPinConfig(PORTE, PIN24_IDX, &amp;amp;portc8_pin53_config); /* PORTE24 (pin 20) is configured as I2C0_SCL */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;const port_pin_config_t portc9_pin54_config = {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; kPORT_PullUp, /* Internal pull-up resistor is enabled */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; kPORT_SlowSlewRate, /* Slow slew rate is configured */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; kPORT_PassiveFilterDisable, /* Passive filter is disabled */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; kPORT_LowDriveStrength, /* Low drive strength is configured */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; kPORT_MuxAlt2, /* Pin is configured as I2C0_SDA */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;};&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;PORT_SetPinConfig(PORTE, PIN25_IDX, &amp;amp;portc9_pin54_config); /* PORTE25 (pin 21) is configured as I2C0_SDA */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the first one the function is &lt;EM&gt;"&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;EM&gt;PORT_SetPinMux(&lt;/EM&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and in the second one the function is &lt;EM&gt;"&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;SPAN&gt;PORT_SetPinConfig("&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Why are there two versions of the same file in the project, which one is correct and how do I get rid of the other one?&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Apr 2024 08:25:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1843781#M66273</guid>
      <dc:creator>juliancox</dc:creator>
      <dc:date>2024-04-10T08:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1843813#M66274</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;In the debugger, after the pin_mux.c has been executed, pls check the&lt;/P&gt;
&lt;P&gt;PORTC_PCR[8]/PORTC_PCR[9] registers and check the MUX bits if the bits are 2.&lt;/P&gt;
&lt;P&gt;You can also use the code:&lt;/P&gt;
&lt;P&gt;This is the procedure to configure pins:&lt;/P&gt;
&lt;P&gt;1)enable PORTC gated clock&lt;/P&gt;
&lt;P&gt;SIM-&amp;gt;SCGC5|=1&amp;lt;&amp;lt;11;&lt;/P&gt;
&lt;P&gt;2)configure the Pin35 and Pin36 as I2C0 pins as ALT2&lt;/P&gt;
&lt;P&gt;PORTC_8:&lt;/P&gt;
&lt;P&gt;PORTC-&amp;gt;PCR[8]&amp;amp;=~(7&amp;lt;&amp;lt;8);&lt;/P&gt;
&lt;P&gt;PORTC-&amp;gt;PCR[8]|=(2&amp;lt;&amp;lt;8);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PORTC_9:&lt;/P&gt;
&lt;P&gt;PORTC-&amp;gt;PCR[9]&amp;amp;=~(7&amp;lt;&amp;lt;8);&lt;/P&gt;
&lt;P&gt;PORTC-&amp;gt;PCR[9]|=(2&amp;lt;&amp;lt;8);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xiangjun_rong_0-1712738809928.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/272907i494CB899DE45B887/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xiangjun_rong_0-1712738809928.png" alt="xiangjun_rong_0-1712738809928.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope it can help you&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 08:52:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MCUXpresso/m-p/1843813#M66274</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2024-04-10T08:52:28Z</dc:date>
    </item>
  </channel>
</rss>

