<?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: MK64 DSPI with external PGA and ADC in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1469498#M63252</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please check my code, what I want to understand is that if I need to receive 30K ADC samples it requires 30KBytes of Transfer data? This is Synchronous communication means it will doesn't work until TX?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Fahad&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2022 18:15:32 GMT</pubDate>
    <dc:creator>fshah30</dc:creator>
    <dc:date>2022-06-06T18:15:32Z</dc:date>
    <item>
      <title>MK64 DSPI with external PGA and ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1467515#M63215</link>
      <description>&lt;P&gt;Hi, I want to use the DSPI to work with PGA (Gain Amplifier) and external ADC. Kindly help me to setup the source code that work well with this scenario. I can send the data to PGA and control the gain of the input signal, I don't understand how can I receive the data from ADC?&amp;nbsp;&lt;/P&gt;&lt;P&gt;ADC # AD7940BRMZ&lt;/P&gt;&lt;P&gt;PGA # MCP6S26-I/ST&lt;/P&gt;&lt;P&gt;See the attached schematic for understanding. Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 14:07:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1467515#M63215</guid>
      <dc:creator>fshah30</dc:creator>
      <dc:date>2022-06-01T14:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: MK64 DSPI with external PGA and ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1467718#M63220</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I review your image but I don't understand the diagram, there are lines without a name, Could you provide me more information about your connection?. I found this application note [&lt;A href="https://www.nxp.com/docs/en/application-note/AN3904.pdf" target="_blank"&gt;MPC5121e Serial Peripheral Interface (SPI) (nxp.com)&lt;/A&gt;] is not for the same MPC, but maybe will help you. Are you trying to do this?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pavel_Hernandez_0-1654118268848.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/181973iB2FDB9267DAADCAD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pavel_Hernandez_0-1654118268848.png" alt="Pavel_Hernandez_0-1654118268848.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 21:23:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1467718#M63220</guid>
      <dc:creator>Pavel_Hernandez</dc:creator>
      <dc:date>2022-06-01T21:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: MK64 DSPI with external PGA and ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1467783#M63222</link>
      <description>&lt;P&gt;Hi, Please find the attached SCH for your review.&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are TWO parts&lt;/P&gt;&lt;P&gt;1- send the data to Gain Amplifier chip which is working fine, I can see gain increase and decrease in oscilloscope&lt;/P&gt;&lt;P&gt;2-&amp;nbsp; Read data from ADC chip which is not working.&lt;/P&gt;&lt;P&gt;See the attached code for your review. Please let me know where I am doing wrong? Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 22:17:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1467783#M63222</guid>
      <dc:creator>fshah30</dc:creator>
      <dc:date>2022-06-01T22:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: MK64 DSPI with external PGA and ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1468441#M63231</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I review the schematic and I understand the next.&lt;/P&gt;
&lt;P&gt;You are using the k64 to send commands of SPI to the MCP, this works fine, but when you configure the MCP to the ADC should answer back to the K64?, tell me if I'm wrong.&lt;/P&gt;
&lt;P&gt;But I do not see the problems are in the K64, if your problem is about the ADC you need to contact the vendor for getting more details. I suggest reviewing the frequency that can be supported by the ADC, I reviewed the datasheet of the ADC, and check if you are using the CS correct this starts the frame.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 21:10:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1468441#M63231</guid>
      <dc:creator>Pavel_Hernandez</dc:creator>
      <dc:date>2022-06-02T21:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: MK64 DSPI with external PGA and ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1468443#M63232</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;I can see the ADC is working now and give me the readings. Please can you provide code to store 30K samples from the same ADC. I attached my code for your review. Thanks&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;*Brief Master Read Task Start&lt;BR /&gt;*/&lt;/P&gt;&lt;P&gt;static void master_read_task(void *pvParameters)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;uint32_t i = 0;&lt;BR /&gt;status_t status;&lt;/P&gt;&lt;P&gt;// /* Transfer structure for half-duplex. */&lt;BR /&gt;// dspi_half_duplex_transfer_t xfer = {0};&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;dspi_transfer_t masterXfer;&lt;BR /&gt;dspi_master_config_t masterConfig;&lt;/P&gt;&lt;P&gt;PRINTF("SPI master board will transmit data to slave board first, then receive data from slave board.\r\n");&lt;/P&gt;&lt;P&gt;PRINTF("Besides, Master will transfer data by interrupt way, and slave will use interrupt way.");&lt;BR /&gt;PRINTF("\r\nMaster start to tansfer...\r\n");&lt;/P&gt;&lt;P&gt;/* Master config */&lt;BR /&gt;masterConfig.whichCtar = kDSPI_Ctar1;&lt;BR /&gt;masterConfig.ctarConfig.baudRate = TRANSFER_BAUDRATE;&lt;BR /&gt;masterConfig.ctarConfig.bitsPerFrame = 16U;&lt;BR /&gt;masterConfig.ctarConfig.cpol = kDSPI_ClockPolarityActiveHigh;&lt;BR /&gt;masterConfig.ctarConfig.cpha = kDSPI_ClockPhaseFirstEdge;&lt;BR /&gt;masterConfig.ctarConfig.direction = kDSPI_MsbFirst;&lt;BR /&gt;masterConfig.ctarConfig.pcsToSckDelayInNanoSec = 500;//was 2000&lt;BR /&gt;masterConfig.ctarConfig.lastSckToPcsDelayInNanoSec = 500;//was 2000&lt;BR /&gt;masterConfig.ctarConfig.betweenTransferDelayInNanoSec = 1000;//was 1000&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;masterConfig.whichPcs = kDSPI_Pcs1;&lt;BR /&gt;masterConfig.pcsActiveHighOrLow = kDSPI_PcsActiveLow;&lt;/P&gt;&lt;P&gt;masterConfig.enableContinuousSCK = false;&lt;BR /&gt;masterConfig.enableRxFifoOverWrite = false;&lt;BR /&gt;masterConfig.enableModifiedTimingFormat = false;&lt;BR /&gt;masterConfig.samplePoint = kDSPI_SckToSin0Clock;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;DSPI_MasterInit(EXAMPLE_DSPI_MASTER_BASEADDR, &amp;amp;masterConfig, DSPI_MASTER_CLK_FREQ);&lt;/P&gt;&lt;P&gt;/* Init Buffer*/&lt;BR /&gt;for (i = 0; i &amp;lt; TRANSFER_SIZE; i++)&lt;BR /&gt;{&lt;BR /&gt;txData[i] = i + 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/*Start master receive*/&lt;BR /&gt;masterXfer.txData = masterSendBuffer;&lt;BR /&gt;masterXfer.rxData = masterReceiveBuffer;&lt;BR /&gt;masterXfer.dataSize = TRANSFER_SIZE;&lt;BR /&gt;masterXfer.configFlags = kDSPI_MasterCtar1/**/ | kDSPI_MasterPcs1 | kDSPI_MasterActiveAfterTransfer;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;DSPI_MasterTransferCreateHandle(EXAMPLE_DSPI_MASTER_BASEADDR, &amp;amp;handle, DSPI_MasterInterruptCallback, NULL);&lt;/P&gt;&lt;P&gt;status = DSPI_MasterTransferNonBlocking(EXAMPLE_DSPI_MASTER_BASEADDR, &amp;amp;handle, &amp;amp;masterXfer);&lt;BR /&gt;// status = DSPI_MasterHalfDuplexTransferNonBlocking(EXAMPLE_DSPI_MASTER_BASEADDR, &amp;amp;handle, &amp;amp;xfer);&lt;BR /&gt;// DSPI_MasterHalfDuplexTransferNonBlocking(SPI_Type *base, dspi_master_handle_t *handle, dspi_half_duplex_transfer_t *xfer)&lt;/P&gt;&lt;P&gt;while (!masterFinished)&lt;BR /&gt;{&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (status == kStatus_Success)&lt;BR /&gt;{&lt;BR /&gt;PRINTF("\n\nDSPI data successfully received. \r\n\r\n");&lt;BR /&gt;for (i = 0; i&amp;lt;TRANSFER_SIZE; i++)&lt;BR /&gt;{&lt;BR /&gt;PRINTF("Received Data %d \n",masterReceiveBuffer[i]);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;PRINTF("DSPI received data error. \r\n\r\n");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Stop the transfer. */&lt;BR /&gt;DSPI_Deinit(EXAMPLE_DSPI_MASTER_BASEADDR);&lt;/P&gt;&lt;P&gt;vTaskSuspend(NULL);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 21:15:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1468443#M63232</guid>
      <dc:creator>fshah30</dc:creator>
      <dc:date>2022-06-02T21:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: MK64 DSPI with external PGA and ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1469492#M63251</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Unfortunately, I do not have a code that works with your application.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 17:37:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1469492#M63251</guid>
      <dc:creator>Pavel_Hernandez</dc:creator>
      <dc:date>2022-06-06T17:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: MK64 DSPI with external PGA and ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1469498#M63252</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please check my code, what I want to understand is that if I need to receive 30K ADC samples it requires 30KBytes of Transfer data? This is Synchronous communication means it will doesn't work until TX?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Fahad&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 18:15:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1469498#M63252</guid>
      <dc:creator>fshah30</dc:creator>
      <dc:date>2022-06-06T18:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: MK64 DSPI with external PGA and ADC</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1470776#M63277</link>
      <description>&lt;P&gt;Hello, Could you tell me what is the example you are using? I need to review the code to answer your question.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2022 15:06:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MK64-DSPI-with-external-PGA-and-ADC/m-p/1470776#M63277</guid>
      <dc:creator>Pavel_Hernandez</dc:creator>
      <dc:date>2022-06-08T15:06:46Z</dc:date>
    </item>
  </channel>
</rss>

