<?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: NXP S32K148 - I2C Sniffer in S32K</title>
    <link>https://community.nxp.com/t5/S32K/NXP-S32K148-I2C-Sniffer/m-p/1644724#M22599</link>
    <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I was able to create the sniffer using the GPIO method. I configured the SCL and SDA gpio pins to react on interrupts; SCL reacting on rising edge and SDA reacting on either edge. I also set the SCL interrupt to be a higher priority than the SDA. Doing it this was allowed me to receive and decode the entire message using the start and stop condition of the I2C frame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully this helps anyone else trying to create a sniffer.&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2023 13:16:16 GMT</pubDate>
    <dc:creator>adan_pantoja</dc:creator>
    <dc:date>2023-05-04T13:16:16Z</dc:date>
    <item>
      <title>NXP S32K148 - I2C Sniffer</title>
      <link>https://community.nxp.com/t5/S32K/NXP-S32K148-I2C-Sniffer/m-p/1640858#M22416</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;U&gt;Background&lt;/U&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Board: S32K148&lt;/LI&gt;&lt;LI&gt;SDK: v4.0.3&lt;/LI&gt;&lt;LI&gt;OS: freeRTOS&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;U&gt;Problem&lt;/U&gt;&lt;/P&gt;&lt;P&gt;I am currently working on a project which requires me to monitor an i2c bus and record all information passing between the master and slave. Initially I thought you would be able to configure the lpi2c as a slave, give it an arbitrary address, and configure the callback to execute whenever anything was detected on the lines. The issue is that it appears the callback routine only triggers whenever an i2c frame is directed at my sniffer node (same slave address). Otherwise, the program never enters the callback even though traffic is seen on the bus.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because of the previous issue, I then resorted to use a regular GPIO to trigger on SCL and decode the data that way. I then ran into&amp;nbsp; issue with this method:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I do not know how to to let the software know when all bytes have been received because it is a regular interrupt (No TX/RX complete flags).&lt;/LI&gt;&lt;LI&gt;Because I have to process interrupts back-to-back I ran into issues writing some logic within the ISR handler to notify the program when the last byte was received. (I tried adding some logic, but this causes the program to miss some bits).&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I tried using a freeRTOS timer that will continuously reset every time it receives a bit, therefore whenever the timer expires, I can set a flag to notify my software. Unfortunately, this causes some latency in the interrupts and I'll miss bits.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my question: Is there a way to configure lpi2c to sniff the bus and store all data in a buffer (regardless of node address)? If lpi2c cannot be used, what method do you guys recommend for creating the sniffer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate the help!&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 18:17:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/NXP-S32K148-I2C-Sniffer/m-p/1640858#M22416</guid>
      <dc:creator>adan_pantoja</dc:creator>
      <dc:date>2023-04-26T18:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: NXP S32K148 - I2C Sniffer</title>
      <link>https://community.nxp.com/t5/S32K/NXP-S32K148-I2C-Sniffer/m-p/1641521#M22448</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;the LPI2C slave can be configured&amp;nbsp;to match a range of addresses in either 7-bit or 10-bit addressing modes, so it would be able to react on all addresses if configured in that way. But not sure how you get data when slave is going to transmit data.&lt;BR /&gt;I think you will need to set&amp;nbsp;&lt;SPAN&gt;GPIO's in input mode, either with polling or interrupts on transition, and interpret the bus events internally. Maybe you will find some hints/codes on the web for this SW I2C sniffer.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BR, Petr&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 10:58:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/NXP-S32K148-I2C-Sniffer/m-p/1641521#M22448</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2023-04-27T10:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: NXP S32K148 - I2C Sniffer</title>
      <link>https://community.nxp.com/t5/S32K/NXP-S32K148-I2C-Sniffer/m-p/1644724#M22599</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I was able to create the sniffer using the GPIO method. I configured the SCL and SDA gpio pins to react on interrupts; SCL reacting on rising edge and SDA reacting on either edge. I also set the SCL interrupt to be a higher priority than the SDA. Doing it this was allowed me to receive and decode the entire message using the start and stop condition of the I2C frame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully this helps anyone else trying to create a sniffer.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 13:16:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/NXP-S32K148-I2C-Sniffer/m-p/1644724#M22599</guid>
      <dc:creator>adan_pantoja</dc:creator>
      <dc:date>2023-05-04T13:16:16Z</dc:date>
    </item>
  </channel>
</rss>

