<?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>MCX MicrocontrollersのトピックRe: SPI on MCXC242</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2118462#M3200</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/75589"&gt;@firmwareteam&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your post.&amp;nbsp;Are the CPOL and CPHA of the master and slave devices consistent? It is uncertain whether it is a delay issue. Could you add appropriate delay time after the CS assertion to see if the problem can be solved? Or you can send me your project, and I will help you check it.&lt;/P&gt;
&lt;P&gt;BRs,&lt;/P&gt;
&lt;P&gt;Celeste&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jun 2025 09:53:21 GMT</pubDate>
    <dc:creator>Celeste_Liu</dc:creator>
    <dc:date>2025-06-18T09:53:21Z</dc:date>
    <item>
      <title>SPI on MCXC242</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2118288#M3198</link>
      <description>&lt;P&gt;Objective : Board to Board SPI Communication&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SDK examples&lt;/P&gt;&lt;P&gt;frdmmcxc242_spi_polling_b2b_transfer_master&lt;/P&gt;&lt;P&gt;frdmmcxc242_spi_polling_b2b_transfer_slave&lt;/P&gt;&lt;P&gt;By default in this examples SPI Slave Select is configured automatic. Example is working fine. Please see the attached snashot of logic analyzer.&lt;/P&gt;&lt;P&gt;SPI_CS_AUTO.png&lt;/P&gt;&lt;P&gt;However When I am driving the Chip Select manually, I observe that Slave data on MISO line is delayed by 1 byte and there is a data mismatch. Hence example is not working. Attached snapshot.&lt;/P&gt;&lt;P&gt;SPI_CS_GPIO_MANUAL.png&lt;/P&gt;&lt;P&gt;Kindly help to resolve this issue.&lt;/P&gt;&lt;P&gt;#MCXC242&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2025 06:45:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2118288#M3198</guid>
      <dc:creator>firmwareteam</dc:creator>
      <dc:date>2025-06-18T06:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: SPI on MCXC242</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2118462#M3200</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/75589"&gt;@firmwareteam&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your post.&amp;nbsp;Are the CPOL and CPHA of the master and slave devices consistent? It is uncertain whether it is a delay issue. Could you add appropriate delay time after the CS assertion to see if the problem can be solved? Or you can send me your project, and I will help you check it.&lt;/P&gt;
&lt;P&gt;BRs,&lt;/P&gt;
&lt;P&gt;Celeste&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jun 2025 09:53:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2118462#M3200</guid>
      <dc:creator>Celeste_Liu</dc:creator>
      <dc:date>2025-06-18T09:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: SPI on MCXC242</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2120316#M3220</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Are the CPOL and CPHA of the master and slave devices consistent? &lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please find the attached master and slave code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Use this MACRO to switch from Slave Select Auto to Manual as GPIO. Its defined in pin_mux.h on Master Code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define SS_MANUAL 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Let me know if you have any queries.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 17:38:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2120316#M3220</guid>
      <dc:creator>firmwareteam</dc:creator>
      <dc:date>2025-06-20T17:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: SPI on MCXC242</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2122400#M3387</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/237877"&gt;@Celeste_Liu&lt;/a&gt;&amp;nbsp;Do you have any update to share?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jun 2025 17:07:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2122400#M3387</guid>
      <dc:creator>firmwareteam</dc:creator>
      <dc:date>2025-06-24T17:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: SPI on MCXC242</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2123118#M3394</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/75589"&gt;@firmwareteam&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Sorry for the late reply.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think this situation is because the slave MISO sent an extra data 0. I did an experiment: even if the initial data is changed to 3 instead of 0, the slave MISO still sends an extra data 0.&lt;/P&gt;
&lt;DIV id="tinyMceEditorCeleste_Liu_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Celeste_Liu_1-1750849134064.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/344640iAE11B06F3EE1BEC8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Celeste_Liu_1-1750849134064.png" alt="Celeste_Liu_1-1750849134064.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And I think that the occurrence of this delay is normal. You can just remove the first data of the slave, and then there will be no problem.&lt;/P&gt;
&lt;P&gt;BRs,&lt;/P&gt;
&lt;P&gt;Celeste&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 11:00:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2123118#M3394</guid>
      <dc:creator>Celeste_Liu</dc:creator>
      <dc:date>2025-06-25T11:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: SPI on MCXC242</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2125294#M3436</link>
      <description>&lt;P&gt;The question is why its working correctly when CS is kept automatic?&lt;/P&gt;&lt;P&gt;Also, I will be loosing the last byte of data from the slave in this case which is not acceptable for my project.&lt;/P&gt;&lt;P&gt;Kindly suggest further.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 04:07:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2125294#M3436</guid>
      <dc:creator>firmwareteam</dc:creator>
      <dc:date>2025-06-30T04:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: SPI on MCXC242</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2126439#M3454</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/75589"&gt;@firmwareteam&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;After rechecking, I found that when the CS is set to manual mode, except for the first bit sent by the slave, the subsequent bits are all loopback data from the master. It seems that because the slave's transmission buffer is not updated, it starts to send the last received data.&lt;/P&gt;
&lt;P&gt;I will report the issue to the internal team to see if they have any suggestions.&lt;/P&gt;
&lt;P&gt;BRs,&lt;/P&gt;
&lt;P&gt;Celeste&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 12:34:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2126439#M3454</guid>
      <dc:creator>Celeste_Liu</dc:creator>
      <dc:date>2025-07-01T12:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: SPI on MCXC242</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2127688#M3467</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/75589"&gt;@firmwareteam&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I was able to identify the root cause of the issue. The problem is located in the master project. It appears to be related to the CPHA configuration. As stated in Section 35.5.7, "SPI Clock Formats," of the Reference Manual, when CPHA is set to 0, the chip select (CS) line must remain idle between transfers.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Celeste_Liu_0-1751510819245.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/345879iD4A281AE8827E859/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Celeste_Liu_0-1751510819245.png" alt="Celeste_Liu_0-1751510819245.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P data-cici-select-uid="222a392b-debf-4d0b-a939-eea9c928f178"&gt;Due to this requirement, modifying the chip select mode alters the behavior of the MCXC242.&lt;/P&gt;
&lt;P data-cici-select-uid="d9834223-4e1c-4125-8700-f08f98a4fd99"&gt;To address this, you can update your code as follows:&lt;/P&gt;
&lt;P data-cici-select-uid="3ac6b3a0-a401-4626-99d3-328a78eef71f"&gt;Remove the lines:&lt;/P&gt;
&lt;P data-cici-select-uid="2f2f41f7-26de-4e0c-aa3c-e28dd0e564ea"&gt;GPIO_PinWrite(GPIOC, 4U, 0U);&lt;BR data-cici-select-uid="330b1606-d12b-489b-a305-ec6c04af2d8f" /&gt;GPIO_PinWrite(GPIOC, 4U, 1U);&lt;/P&gt;
&lt;P data-cici-select-uid="2f2f41f7-26de-4e0c-aa3c-e28dd0e564ea"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-cici-select-uid="2f2f41f7-26de-4e0c-aa3c-e28dd0e564ea"&gt;&lt;SPAN&gt;from the main function, and instead, place them within the SPI_MasterTransferBlocking function located in the fsl_spi.c file.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Celeste_Liu_1-1751510887974.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/345880iFF4493D6132C6531/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Celeste_Liu_1-1751510887974.png" alt="Celeste_Liu_1-1751510887974.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This modification will ensure proper data transmission, as the chip select line will now behave according to the timing requirements specified for CPHA = 0.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Celeste_Liu_2-1751510930592.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/345881i1FE55C16098F8D13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Celeste_Liu_2-1751510930592.png" alt="Celeste_Liu_2-1751510930592.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope it can&lt;SPAN&gt;&amp;nbsp;help you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BRs,&lt;/P&gt;
&lt;P&gt;Celeste&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!&lt;BR /&gt;--------------------------------------------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2025 02:50:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/SPI-on-MCXC242/m-p/2127688#M3467</guid>
      <dc:creator>Celeste_Liu</dc:creator>
      <dc:date>2025-07-03T02:50:16Z</dc:date>
    </item>
  </channel>
</rss>

