<?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>S32KのトピックLPSPI multi master configuration example</title>
    <link>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1195410#M9167</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here am with S32K 148 EVB &amp;amp; here am with 6 sensors(slaves) that need to communicate over SPI channel, As I see S32K will support only 4 chip selects, how to achieve communication with 6 sensors ? (am using SPI PAL drivers from processor expert configuration).S32K 148 is the master.&lt;/P&gt;&lt;P&gt;Also can some one provide me the example on LPSPI multi master configuration on same SPI channel (SPI0).&lt;/P&gt;&lt;P&gt;Thank you in advance !&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Dec 2020 09:59:21 GMT</pubDate>
    <dc:creator>Saitej</dc:creator>
    <dc:date>2020-12-08T09:59:21Z</dc:date>
    <item>
      <title>LPSPI multi master configuration example</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1195410#M9167</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here am with S32K 148 EVB &amp;amp; here am with 6 sensors(slaves) that need to communicate over SPI channel, As I see S32K will support only 4 chip selects, how to achieve communication with 6 sensors ? (am using SPI PAL drivers from processor expert configuration).S32K 148 is the master.&lt;/P&gt;&lt;P&gt;Also can some one provide me the example on LPSPI multi master configuration on same SPI channel (SPI0).&lt;/P&gt;&lt;P&gt;Thank you in advance !&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 09:59:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1195410#M9167</guid>
      <dc:creator>Saitej</dc:creator>
      <dc:date>2020-12-08T09:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI multi master configuration example</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1196363#M9184</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;The LPSPI0 module supports only 4 PCS.&lt;/P&gt;
&lt;P&gt;But the S32K148 MCU has 6 LPSPI0 PCS pins.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielmartynek_0-1607514529957.png" style="width: 771px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/132230i698E9328F408E62C/image-dimensions/771x287?v=v2" width="771" height="287" role="button" title="danielmartynek_0-1607514529957.png" alt="danielmartynek_0-1607514529957.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So you could use all of the PCS pins.&lt;/P&gt;
&lt;P&gt;For example LPSPI0 PCS0 can be either PTA26 or PTB0.&lt;/P&gt;
&lt;P&gt;The port module would need to be reconfigured so that the LPSPI0 module can control the correct pin before a transfer is triggered.&lt;/P&gt;
&lt;P&gt;We don't have such an example though.&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>Wed, 09 Dec 2020 11:58:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1196363#M9184</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-12-09T11:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI multi master configuration example</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1197745#M9206</link>
      <description>&lt;P&gt;Thankyou for the response&amp;nbsp;&lt;/P&gt;&lt;P&gt;But re initialising the port pins at the run time may cost the time.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 200px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/132541iC402B8C57504E0DC/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here I have attached my code , in which SPI0 is the master and SPI1 and SPI2 are the slaves , if am communicating alone with SPI1 or SPI2 it is working fine able to send &amp;amp; receive data properly. but if SPI1 and SPI2 sharing the SDI &amp;amp; SDO, SCLK lines of SPI0 then am seeing master received data is "255".&lt;/P&gt;&lt;P&gt;uint8_t master_send[BUFFER_SIZE] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};&lt;BR /&gt;uint8_t master_receive[BUFFER_SIZE];&lt;BR /&gt;uint8_t slave_send[BUFFER_SIZE] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};&lt;BR /&gt;uint8_t slave_receive[BUFFER_SIZE];&lt;BR /&gt;volatile uint8_t i = 0;&lt;BR /&gt;uint8_t frame_sent = 1;&lt;BR /&gt;volatile uint32_t swt = 0;&lt;/P&gt;&lt;P&gt;CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT,g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);&lt;BR /&gt;CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);&lt;/P&gt;&lt;P&gt;PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr);&lt;BR /&gt;PINS_DRV_ClearPins(GPIO_LED, RED_LED);&lt;BR /&gt;/* Initialize SPI0 */&lt;BR /&gt;SPI_MasterInit(&amp;amp;spi1Instance, &amp;amp;spi1_MasterConfig0);&lt;BR /&gt;//SPI_MasterInit(&amp;amp;spi1Instance, &amp;amp;spi1_MasterConfig1);&lt;BR /&gt;/* Initialize SPI1 */&lt;BR /&gt;SPI_SlaveInit(&amp;amp;spi2Instance, &amp;amp;spi2_SlaveConfig0);&lt;BR /&gt;//SPI_SlaveInit(&amp;amp;spi3Instance, &amp;amp;spi3_SlaveConfig0);&lt;/P&gt;&lt;P&gt;PINS_DRV_SetPins(GPIO_LED, GREEN_LED);&lt;BR /&gt;OSIF_TimeDelay(500);&lt;BR /&gt;PINS_DRV_ClearPins(GPIO_LED, GREEN_LED);&lt;/P&gt;&lt;P&gt;while(1)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;SPI_SlaveTransfer(&amp;amp;spi2Instance, slave_send, slave_receive, NUMBER_OF_FRAMES);&lt;BR /&gt;SPI_MasterTransferBlocking(&amp;amp;spi1Instance, master_send, master_receive, (uint8_t) NUMBER_OF_FRAMES, (uint8_t) TIMEOUT);&lt;BR /&gt;/* verify that the data received is correct */&lt;BR /&gt;frame_sent = 1;&lt;BR /&gt;for(i = 0U; i &amp;lt; BUFFER_SIZE; i++)&lt;BR /&gt;{&lt;BR /&gt;if((slave_send[i] != master_receive[i]) || (master_send[i] != slave_receive[i]))&lt;BR /&gt;{&lt;BR /&gt;frame_sent = 0;&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;if(frame_sent == 0)&lt;BR /&gt;{&lt;BR /&gt;//PINS_DRV_SetPins(GPIO_LED, BLUE_LED);&lt;BR /&gt;PINS_DRV_ClearPins(GPIO_LED, BLUE_LED);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;PINS_DRV_SetPins(GPIO_LED, BLUE_LED);&lt;BR /&gt;//PINS_DRV_ClearPins(GPIO_LED, BLUE_LED);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;SPI_SetSS(&amp;amp;spi1Instance, spi1_MasterConfig1.ssPin);&lt;BR /&gt;SPI_SlaveTransfer(&amp;amp;spi3Instance, slave_send, slave_receive, NUMBER_OF_FRAMES);&lt;BR /&gt;SPI_MasterTransferBlocking(&amp;amp;spi1Instance, master_send, master_receive, (uint8_t) NUMBER_OF_FRAMES, (uint8_t) TIMEOUT);&lt;BR /&gt;/* verify that the data received is correct */&lt;BR /&gt;frame_sent = 1;&lt;BR /&gt;for(i = 0U; i &amp;lt; BUFFER_SIZE; i++)&lt;BR /&gt;{&lt;BR /&gt;if((slave_send[i] != master_receive[i]) || (master_send[i] != slave_receive[i]))&lt;BR /&gt;{&lt;BR /&gt;frame_sent = 0;&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;if(frame_sent == 0)&lt;BR /&gt;{&lt;BR /&gt;PINS_DRV_SetPins(GPIO_LED, RED_LED);&lt;BR /&gt;//PINS_DRV_ClearPins(GPIO_LED, RED_LED);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;//PINS_DRV_SetPins(GPIO_LED, RED_LED);&lt;BR /&gt;PINS_DRV_ClearPins(GPIO_LED, RED_LED);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Small observation here all the time am seeing Slave side CS pin (SPI1) is high even after SPI transaction.&lt;/P&gt;&lt;P&gt;attached&amp;nbsp;processor expert configuration screen shots&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 05:36:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1197745#M9206</guid>
      <dc:creator>Saitej</dc:creator>
      <dc:date>2020-12-14T05:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI multi master configuration example</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1198957#M9244</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Which SDK version do you use?&lt;/P&gt;
&lt;P&gt;The LPSPI_DRV_SetPcs() function takes 3 parameters including PCS polarity.&lt;/P&gt;
&lt;P&gt;Please step the function and double-check if the TCR command (which_pcs, polarity) is correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 14:01:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1198957#M9244</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-12-14T14:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI multi master configuration example</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1199281#M9250</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;am using S32K148_SDK 3.0.0&lt;/P&gt;&lt;P&gt;Yes, in debug mode cross verified the TCS register it is updating as per requirement. Even in the logic analyser we can see CS is working as expected &amp;amp; even MOSI line also working as expected.&lt;/P&gt;&lt;P&gt;But MISO is line is continuously high.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SPI1.JPG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/132659i2AFB5CDA12C9B4FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPI1.JPG" alt="SPI1.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SPI1_2.JPG" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/132660i6E1C3E61D52E08E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPI1_2.JPG" alt="SPI1_2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 03:10:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1199281#M9250</guid>
      <dc:creator>Saitej</dc:creator>
      <dc:date>2020-12-15T03:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI multi master configuration example</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1199566#M9254</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;It seems like the slave modules do not detect the PCS.&lt;/P&gt;
&lt;P&gt;All I see from the attachments is that the slave modules are routed to 2 PCS each in PORT.&lt;/P&gt;
&lt;P&gt;But are the slave modules configured to the correct PCS in LPSPI?&lt;/P&gt;
&lt;P&gt;Also, get the status of the slave transfers with LPSPI_DRV_SlaveGetTransferStatus().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;BR, Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 09:51:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-multi-master-configuration-example/m-p/1199566#M9254</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-12-15T09:51:04Z</dc:date>
    </item>
  </channel>
</rss>

