<?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: Microcontroller S32K118 I2C protocol register configuration in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1770659#M29412</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/226601"&gt;@Eletronicc_23&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The address of the device is sent automatically.&lt;/P&gt;
&lt;P&gt;In this example, you need TRANSFER_SIZE = 2.&lt;/P&gt;
&lt;P&gt;The tx_buffer should contain the address of the register and the data to be written to that register.&lt;/P&gt;
&lt;P&gt;Please use a logic analyzer ot an oscilloscope to verify the transfer on the bus.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Thu, 07 Dec 2023 10:15:33 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2023-12-07T10:15:33Z</dc:date>
    <item>
      <title>Microcontroller S32K118 I2C protocol register configuration</title>
      <link>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1768430#M29292</link>
      <description>&lt;P&gt;Hi friends, is a pleasure to be here. I am working with the protocol I2C using the microcontroller S32K118. I am working with a device calls&amp;nbsp;&lt;SPAN class=""&gt;KTS1622EUAA-TR that is a extenser of inputs and outputs. The good news that I2c fuction of the program lpi2c_master_s32k118 it is working because it reconigzed the device to write and read, but I want to work the registers of the device so the problem that I have here which the fuction that I can write to the registers of the device, the fuctions for it&amp;nbsp; are this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;status_t LPI2C_DRV_MasterSendData(uint32_t instance,&lt;BR /&gt;const uint8_t * txBuff,&lt;BR /&gt;uint32_t txSize,&lt;BR /&gt;bool sendStop)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;status_t LPI2C_DRV_MasterSendDataBlocking(uint32_t instance,&lt;BR /&gt;const uint8_t * txBuff,&lt;BR /&gt;uint32_t txSize,&lt;BR /&gt;bool sendStop,&lt;BR /&gt;uint32_t timeout)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Another thing that I want to use for this is to read the state of the inputs and outputs of the device&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;status_t LPI2C_DRV_MasterReceiveData(uint32_t instance,&lt;BR /&gt;uint8_t * rxBuff,&lt;BR /&gt;uint32_t rxSize,&lt;BR /&gt;bool sendStop)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;status_t LPI2C_DRV_MasterReceiveDataBlocking(uint32_t instance,&lt;BR /&gt;uint8_t * rxBuff,&lt;BR /&gt;uint32_t rxSize,&lt;BR /&gt;bool sendStop,&lt;BR /&gt;uint32_t timeout)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;please let me know about it,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 17:56:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1768430#M29292</guid>
      <dc:creator>Eletronicc_23</dc:creator>
      <dc:date>2023-12-04T17:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Microcontroller S32K118 I2C protocol register configuration</title>
      <link>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1768905#M29308</link>
      <description>&lt;P&gt;HI &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/226601"&gt;@Eletronicc_23&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The KTS1622 datasheet specifies the format.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.kinet-ic.com/uploads/KTS1622-04d.pdf" target="_blank"&gt;https://www.kinet-ic.com/uploads/KTS1622-04d.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1701767438278.png" style="width: 674px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/253028i7A3629E85185E637/image-dimensions/674x229?v=v2" width="674" height="229" role="button" title="danielmartynek_0-1701767438278.png" alt="danielmartynek_0-1701767438278.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you decide to use the blocking method, it should be something like this:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;LPI2C_DRV_MasterSendDataBlocking&lt;/SPAN&gt;(uint32_t instance, const uint8_t * txBuff, uint32_t txSize, bool sendStop, &lt;SPAN class=""&gt;uint32_t timeout);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;where txSize = 1 and sendStop = 0.&lt;/P&gt;
&lt;P&gt;followed by&lt;/P&gt;
&lt;P&gt;LPI2C_DRV_MasterReceiveDataBlocking(uint32_t instance, uint8_t * rxBuff, uint32_t rxSize, bool sendStop, uint32_t timeout);&lt;/P&gt;
&lt;P&gt;where rxSize = 1 and sendStop = 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use the non-blocking method, you need to use this function to get the status of the transfer.&lt;/P&gt;
&lt;P&gt;LPI2C_DRV_MasterGetTransferStatus(uint32_t instance, uint32_t *bytesRemaining);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 09:17:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1768905#M29308</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2023-12-05T09:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Microcontroller S32K118 I2C protocol register configuration</title>
      <link>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1769025#M29320</link>
      <description>&lt;P&gt;ok for example if I want to write in int the register 0x06 to configurate all the pins of the port0 as input or output, how it will be using the function&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;LPI2C_DRV_MasterSendDataBlocking&lt;/SPAN&gt;&lt;SPAN&gt;(uint32_t instance, const uint8_t * txBuff, uint32_t txSize, bool sendStop,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;uint32_t timeout)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;It will something like this, because I am not sure to send the information to the device&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/* Definition of the data transfer size */&lt;BR /&gt;#define TRANSFER_SIZE (3u)&lt;/P&gt;&lt;P&gt;uint8_t buffer3[TRANSFER_SIZE]={0x05,0xFF};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LPI2C_DRV_MasterSendDataBlocking(INST_LPI2C1,buffer3,TRANSFER_SIZE, true, OSIF_WAIT_FOREVER);&lt;/P&gt;&lt;P&gt;Please let me know friends&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Rony Vargas&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 12:17:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1769025#M29320</guid>
      <dc:creator>Eletronicc_23</dc:creator>
      <dc:date>2023-12-05T12:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Microcontroller S32K118 I2C protocol register configuration</title>
      <link>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1769029#M29323</link>
      <description>&lt;P&gt;ok for example if I want to write in int the register 0x06 to configurate all the pins of the port0 as input or output, how it will be using the function&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt;LPI2C_DRV_MasterSendDataBlocking&lt;/SPAN&gt;&lt;SPAN&gt;(uint32_t instance, const uint8_t * txBuff, uint32_t txSize, bool sendStop,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;uint32_t timeout)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;It will something like this, because I am not sure to send the information to the device&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;/* Definition of the data transfer size */&lt;BR /&gt;#define TRANSFER_SIZE (3u)&lt;/P&gt;&lt;P&gt;uint8_t buffer3[TRANSFER_SIZE]={0x05,0xFF};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LPI2C_DRV_MasterSendDataBlocking(INST_LPI2C1,buffer3,TRANSFER_SIZE, true, OSIF_WAIT_FOREVER);&lt;/P&gt;&lt;P&gt;Please let me know friends&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Rony Vargas&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 12:23:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1769029#M29323</guid>
      <dc:creator>Eletronicc_23</dc:creator>
      <dc:date>2023-12-05T12:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Microcontroller S32K118 I2C protocol register configuration</title>
      <link>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1770659#M29412</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/226601"&gt;@Eletronicc_23&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;The address of the device is sent automatically.&lt;/P&gt;
&lt;P&gt;In this example, you need TRANSFER_SIZE = 2.&lt;/P&gt;
&lt;P&gt;The tx_buffer should contain the address of the register and the data to be written to that register.&lt;/P&gt;
&lt;P&gt;Please use a logic analyzer ot an oscilloscope to verify the transfer on the bus.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 10:15:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1770659#M29412</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2023-12-07T10:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Microcontroller S32K118 I2C protocol register configuration</title>
      <link>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1772257#M29505</link>
      <description>&lt;P&gt;Ok good, in this case to receive how will&amp;nbsp; be the example?, I understand if I send the register 0X00, it will send me back the state of the input to see how is the configuration of the Port depending the pin that I want to read. it is something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define RECEIVE_SIZE (2u)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;uint8_t masterTxBuffer[TRANSFER_SIZE]={0x00};&lt;BR /&gt;uint8_t masterRxBuffer[TRANSFER_SIZE];&lt;/P&gt;&lt;P&gt;LPI2C_DRV_MasterSendDataBlocking(INST_LPI2C1, masterTxBuffer,RECEIVE_SIZE, true, OSIF_WAIT_FOREVER);&lt;/P&gt;&lt;P&gt;LPI2C_DRV_MasterReceiveDataBlocking(INST_LPI2C1, masterRxBuffer,RECEIVE_SIZE, true, OSIF_WAIT_FOREVER);&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 11:09:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1772257#M29505</guid>
      <dc:creator>Eletronicc_23</dc:creator>
      <dc:date>2023-12-11T11:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Microcontroller S32K118 I2C protocol register configuration</title>
      <link>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1772280#M29507</link>
      <description>&lt;P&gt;The SendDataBlocking should not send the STOP condition in this case.&lt;/P&gt;
&lt;P&gt;RECEIVE_SIZE should be 1 if you read just one register, but this depends on the Slave device, please refer to the datasheet of the device.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regadrs,&lt;BR /&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 11:51:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1772280#M29507</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2023-12-11T11:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Microcontroller S32K118 I2C protocol register configuration</title>
      <link>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1772292#M29508</link>
      <description>&lt;P&gt;ok in this case I want to read the input of PORT0 that is the register 0x00, so it will be like this my friend if I am not wrong:&lt;/P&gt;&lt;P&gt;#define RECEIVE_SIZE (1u)&lt;/P&gt;&lt;P&gt;uint8_t masterTxBuffer[ RECEIVE_SIZE]={0x00};&lt;BR /&gt;uint8_t masterRxBuffer[ RECEIVE_SIZE];&lt;/P&gt;&lt;P&gt;LPI2C_DRV_MasterSendDataBlocking(INST_LPI2C1, masterTxBuffer,RECEIVE_SIZE, false, OSIF_WAIT_FOREVER);&lt;/P&gt;&lt;P&gt;LPI2C_DRV_MasterReceiveDataBlocking(INST_LPI2C1, masterRxBuffer,RECEIVE_SIZE, true, OSIF_WAIT_FOREVER);&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 12:21:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Microcontroller-S32K118-I2C-protocol-register-configuration/m-p/1772292#M29508</guid>
      <dc:creator>Eletronicc_23</dc:creator>
      <dc:date>2023-12-11T12:21:17Z</dc:date>
    </item>
  </channel>
</rss>

