<?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: MPC5748G sending data using i2c in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-sending-data-using-i2c/m-p/1525040#M22011</link>
    <description>&lt;DIV class=""&gt;oppening it from s32ds project from example doesnt give me the whole include and src files, how can i get them all?&lt;BR /&gt;can you explain how can i open it so i can try to debug it?&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled 2.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/194323i49869E97E9D4A9AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled 2.png" alt="Untitled 2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/194324iED3DFE834022732E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;as you can see i cant work, many errors because other files are not loaded, please help me by telling me how to open the example project&lt;/DIV&gt;</description>
    <pubDate>Tue, 20 Sep 2022 13:41:43 GMT</pubDate>
    <dc:creator>turkmani_11</dc:creator>
    <dc:date>2022-09-20T13:41:43Z</dc:date>
    <item>
      <title>MPC5748G sending data using i2c</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-sending-data-using-i2c/m-p/1523862#M21999</link>
      <description>&lt;P&gt;hi, im trying to send an array that contains data (numbers) through the i2c to another microcontroller (stm)&lt;/P&gt;&lt;P&gt;i have the following example code given by NPX :&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/*****************************************************************************/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* FILE NAME: i2c_Z4_1.c COPYRIGHT (c) NXP Semiconductors 2016 */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* All Rights Reserved */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* PLATFORM: DEVKIT-MPC5748G */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* DESCRIPTION: Initializes the I2C_1 in master mode and I2C_2 in slave mode*/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* Master sends the address and data and Slave receives both */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* The address and the data */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* Provide a pull-up of 3.3V via pull-up register(10k) to both */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* SCL and SDA lines */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* I2C_1 I2C_2 */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* SCL: PE0: J4_16 SCL: PE9: J2_8 */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* SDA: PE1: J4_14 SDA: PE8: J2_6 */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/*****************************************************************************/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* REV AUTHOR DATE DESCRIPTION OF CHANGE */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* --- ----------- ---------- --------------------- */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* 1.0 K Shah 31 Mar 2016 Initial working version */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/*****************************************************************************/&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;#include "derivative.h" /* include peripheral declarations */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#include "project.h"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#include "mode.h"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#include "i2c.h"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;#define KEY_VALUE1 0x5AF0ul&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#define KEY_VALUE2 0xA50Ful&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;extern void xcptn_xmpl(void);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;void peri_clock_gating(void); /* Configure gating/enabling peripheral(I2C) clocks */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void hw_init(void)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#if defined(DEBUG_SECONDARY_CORES)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;uint32_t mctl = MC_ME.MCTL.R;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#if defined(TURN_ON_CPU1)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* enable core 1 in all modes */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MC_ME.CCTL[2].R = 0x00FE;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* Set Start address for core 1: Will reset and start */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MC_ME.CADDR[2].R = 0x11d0000 | 0x1;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#endif &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#if defined(TURN_ON_CPU2)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* enable core 2 in all modes */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MC_ME.CCTL[3].R = 0x00FE;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* Set Start address for core 2: Will reset and start */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MC_ME.CADDR[3].R = 0x13a0000 | 0x1;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#endif&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MC_ME.MCTL.R = (mctl &amp;amp; 0xffff0000ul) | KEY_VALUE1;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MC_ME.MCTL.R = mctl; /* key value 2 always from MCTL */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#endif /* defined(DEBUG_SECONDARY_CORES) */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/************************************ Main ***********************************/&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;__attribute__ ((section(".text")))&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;int main(void)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;uint8_t data;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;xcptn_xmpl (); /* Configure and Enable Interrupts */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;peri_clock_gating(); /* Configure gating/enabling peripheral(I2C) clocks */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/* Sets clock dividers= max freq,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;calls PLL_160MHz function which:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MC_ME.ME: enables all modes for Mode Entry module&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Connects XOSC to PLL&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;PLLDIG: LOLIE=1, PLLCAL3=0x09C3_C000, no sigma delta, 160MHz&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MC_ME.DRUN_MC: configures sysclk = PLL&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Mode transition: re-enters DRUN which activates PLL=sysclk &amp;amp; peri clks&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;*/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;initI2C_1(); /* I2C1 module configured as a Master and in Transmit mode */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;initI2C_2(); /* I2C2 module configured as a Slave and in Receive mode */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* Transmit Address */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;transmit_addr_master_I2C_1(0x01);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;data = receive_slave_I2C_2();&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(data == 1)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SIUL2.MSCR[PA10].B.OBE = 1; /* Pad PA10 (10): OBE=1. On EVB active low DS4 LED */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;while(1)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;transmit_data_master_I2C_1('H');&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;data = receive_slave_I2C_2();&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;if(data == 'H')&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SIUL2.MSCR[PA10].B.OBE ^= 1; /* Pad PA10 (10): OBE=OBE xor 1. On EVB active low DS4 LED */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;data = 0;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;return 0;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/******************** End of Main ***************************************/&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void peri_clock_gating() { /* Configure gating/enabling peripheral(I2C) clocks */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MC_ME.RUN_PC[0].R = 0x00000000; /* Gate off clock for all RUN modes */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MC_ME.RUN_PC[1].R = 0x000000FE; /* Configures peripheral clock for all RUN modes */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MC_ME.PCTL[31].B.RUN_CFG = 0x1; /* I2C_1: select peripheral configuration RUN_PC[1] */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;MC_ME.PCTL[32].B.RUN_CFG = 0x1; /* I2C_2: select peripheral configuration RUN_PC[1] */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where should i write my array so i can send it ?&lt;/P&gt;&lt;P&gt;please help me by explaining where i should store the array in the i2c data frame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Sep 2022 13:25:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-sending-data-using-i2c/m-p/1523862#M21999</guid>
      <dc:creator>turkmani_11</dc:creator>
      <dc:date>2022-09-18T13:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G sending data using i2c</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-sending-data-using-i2c/m-p/1524941#M22007</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;this is very simple example sending device address using &lt;EM&gt;transmit_addr_master_I2C_1&amp;nbsp;&lt;/EM&gt;and then single byte repeatedly using&amp;nbsp;&lt;EM&gt;transmit_data_master_I2C_1.&lt;BR /&gt;&lt;/EM&gt;I think you can rather refer to SDK example i2C_transfer&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PetrS_0-1663667755021.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/194299iCF21E42AD59C3638/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PetrS_0-1663667755021.png" alt="PetrS_0-1663667755021.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;where sending of&amp;nbsp;packet of data using SDK driver is shown.&lt;/P&gt;
&lt;P&gt;BR, Petr&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 09:59:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-sending-data-using-i2c/m-p/1524941#M22007</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2022-09-20T09:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G sending data using i2c</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-sending-data-using-i2c/m-p/1525040#M22011</link>
      <description>&lt;DIV class=""&gt;oppening it from s32ds project from example doesnt give me the whole include and src files, how can i get them all?&lt;BR /&gt;can you explain how can i open it so i can try to debug it?&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled 2.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/194323i49869E97E9D4A9AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled 2.png" alt="Untitled 2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/194324iED3DFE834022732E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;as you can see i cant work, many errors because other files are not loaded, please help me by telling me how to open the example project&lt;/DIV&gt;</description>
      <pubDate>Tue, 20 Sep 2022 13:41:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-sending-data-using-i2c/m-p/1525040#M22011</guid>
      <dc:creator>turkmani_11</dc:creator>
      <dc:date>2022-09-20T13:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G sending data using i2c</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-sending-data-using-i2c/m-p/1525768#M22020</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;try to generate PE code, e.g. through menu Project -&amp;gt; Generate Processor Expert Code&lt;BR /&gt;Then build again.&lt;BR /&gt;However seems you are using older S32DS and SDK. Try to use latest one S32DS 2.1 and&amp;nbsp;S32_SDK_S32PA_RTM_3.0.3.&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 09:59:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-sending-data-using-i2c/m-p/1525768#M22020</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2022-09-21T09:59:00Z</dc:date>
    </item>
  </channel>
</rss>

