<?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 FRDMK64 SPI INTERRUPT ISSUE in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDMK64-SPI-INTERRUPT-ISSUE/m-p/427650#M2376</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;HI,&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am using FRDMK64f120 controller, KDS2.0 and KSDK 1.1.0 example . I Tried SPI driver example code. in this one i dnt need interrupt so i commented following line&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int32_t IRQNumber = g_dspiIrqId[SPI_INSTANCE];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _int_install_isr(IRQNumber, (INT_ISR_FPTR)DSPI_DRV_MasterIRQHandler, (void*)SPI_INSTANCE);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;after that its not communicating with my AT45DB161 why..?&lt;/P&gt;&lt;P&gt;if i enable interrupt only its working fine. what is the reason?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;MY REQUIREMENT:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; what ever data coming from UART i want to write into external data flash. so for that i am calling external data flash write function inside&amp;nbsp; &lt;STRONG&gt;void uartUser_RxCallback(uint32_t instance, void * param). &lt;/STRONG&gt;function. that time its hanging may be i thing its related to interrupt only give some solution.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;my spi initialization code:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dspi_master_user_config_t userConfig;&lt;/P&gt;&lt;P&gt;userConfig.isChipSelectContinuous = true;&lt;/P&gt;&lt;P&gt;userConfig.isSckContinuous = false;&lt;/P&gt;&lt;P&gt;userConfig.pcsPolarity = kDspiPcs_ActiveLow;&lt;/P&gt;&lt;P&gt;userConfig.whichCtar = kDspiCtar1;//kDspiCtar0;&lt;/P&gt;&lt;P&gt;userConfig.whichPcs = kDspiPcs1;//kDspiPcs0;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//* Init the DSPI module&lt;/P&gt;&lt;P&gt;dspi_master_state_t dspiMasterState;&lt;/P&gt;&lt;P&gt;dspi_status_t status = DSPI_DRV_MasterInit(SPI_INSTANCE, &amp;amp;dspiMasterState, &amp;amp;userConfig);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//* Define bus configuration&lt;/P&gt;&lt;P&gt;dspi_device_t spiDevice;&lt;/P&gt;&lt;P&gt;spiDevice.dataBusConfig.bitsPerFrame = 8;&lt;/P&gt;&lt;P&gt;spiDevice.dataBusConfig.clkPhase = kDspiClockPhase_SecondEdge;//kDspiClockPhase_SecondEdge&lt;/P&gt;&lt;P&gt;spiDevice.dataBusConfig.clkPolarity = kDspiClockPolarity_ActiveLow;//kDspiClockPolarity_ActiveLow&lt;/P&gt;&lt;P&gt;spiDevice.dataBusConfig.direction = kDspiMsbFirst;&lt;/P&gt;&lt;P&gt;spiDevice.bitsPerSec = 60000000;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//* Configure the SPI bus&lt;/P&gt;&lt;P&gt;uint32_t calculatedBaudRate;&lt;/P&gt;&lt;P&gt;status = DSPI_DRV_MasterConfigureBus(SPI_INSTANCE, &amp;amp;spiDevice, &amp;amp;calculatedBaudRate);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* SPI use interrupt, must be installed in MQX and file fsl_dspi_irq.c must not be included in project */&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// int32_t IRQNumber = g_dspiIrqId[SPI_INSTANCE];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //COMMENTED&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// _int_install_isr(IRQNumber, (INT_ISR_FPTR)DSPI_DRV_MasterIRQHandler, (void*)SPI_INSTANCE);&lt;STRONG&gt; //COMMENTED&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;PLEASE GIVE SOME SOLUTION.&lt;/STRONG&gt;&lt;/STRONG&gt;&amp;nbsp; I Can use with interrupt also but when i call spi related function inside &lt;STRONG&gt;void uartUser_RxCallback(uint32_t instance, void * param)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;function its hanging. i dnt know why. may be i thing &lt;STRONG&gt;uartUser_RxCallback &lt;/STRONG&gt;function also interrupt.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sudhakar p&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Nov 2015 09:57:39 GMT</pubDate>
    <dc:creator>sudhakarp</dc:creator>
    <dc:date>2015-11-20T09:57:39Z</dc:date>
    <item>
      <title>FRDMK64 SPI INTERRUPT ISSUE</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDMK64-SPI-INTERRUPT-ISSUE/m-p/427650#M2376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;HI,&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am using FRDMK64f120 controller, KDS2.0 and KSDK 1.1.0 example . I Tried SPI driver example code. in this one i dnt need interrupt so i commented following line&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int32_t IRQNumber = g_dspiIrqId[SPI_INSTANCE];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _int_install_isr(IRQNumber, (INT_ISR_FPTR)DSPI_DRV_MasterIRQHandler, (void*)SPI_INSTANCE);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;after that its not communicating with my AT45DB161 why..?&lt;/P&gt;&lt;P&gt;if i enable interrupt only its working fine. what is the reason?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;MY REQUIREMENT:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; what ever data coming from UART i want to write into external data flash. so for that i am calling external data flash write function inside&amp;nbsp; &lt;STRONG&gt;void uartUser_RxCallback(uint32_t instance, void * param). &lt;/STRONG&gt;function. that time its hanging may be i thing its related to interrupt only give some solution.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;my spi initialization code:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dspi_master_user_config_t userConfig;&lt;/P&gt;&lt;P&gt;userConfig.isChipSelectContinuous = true;&lt;/P&gt;&lt;P&gt;userConfig.isSckContinuous = false;&lt;/P&gt;&lt;P&gt;userConfig.pcsPolarity = kDspiPcs_ActiveLow;&lt;/P&gt;&lt;P&gt;userConfig.whichCtar = kDspiCtar1;//kDspiCtar0;&lt;/P&gt;&lt;P&gt;userConfig.whichPcs = kDspiPcs1;//kDspiPcs0;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//* Init the DSPI module&lt;/P&gt;&lt;P&gt;dspi_master_state_t dspiMasterState;&lt;/P&gt;&lt;P&gt;dspi_status_t status = DSPI_DRV_MasterInit(SPI_INSTANCE, &amp;amp;dspiMasterState, &amp;amp;userConfig);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//* Define bus configuration&lt;/P&gt;&lt;P&gt;dspi_device_t spiDevice;&lt;/P&gt;&lt;P&gt;spiDevice.dataBusConfig.bitsPerFrame = 8;&lt;/P&gt;&lt;P&gt;spiDevice.dataBusConfig.clkPhase = kDspiClockPhase_SecondEdge;//kDspiClockPhase_SecondEdge&lt;/P&gt;&lt;P&gt;spiDevice.dataBusConfig.clkPolarity = kDspiClockPolarity_ActiveLow;//kDspiClockPolarity_ActiveLow&lt;/P&gt;&lt;P&gt;spiDevice.dataBusConfig.direction = kDspiMsbFirst;&lt;/P&gt;&lt;P&gt;spiDevice.bitsPerSec = 60000000;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//* Configure the SPI bus&lt;/P&gt;&lt;P&gt;uint32_t calculatedBaudRate;&lt;/P&gt;&lt;P&gt;status = DSPI_DRV_MasterConfigureBus(SPI_INSTANCE, &amp;amp;spiDevice, &amp;amp;calculatedBaudRate);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* SPI use interrupt, must be installed in MQX and file fsl_dspi_irq.c must not be included in project */&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// int32_t IRQNumber = g_dspiIrqId[SPI_INSTANCE];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //COMMENTED&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// _int_install_isr(IRQNumber, (INT_ISR_FPTR)DSPI_DRV_MasterIRQHandler, (void*)SPI_INSTANCE);&lt;STRONG&gt; //COMMENTED&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;PLEASE GIVE SOME SOLUTION.&lt;/STRONG&gt;&lt;/STRONG&gt;&amp;nbsp; I Can use with interrupt also but when i call spi related function inside &lt;STRONG&gt;void uartUser_RxCallback(uint32_t instance, void * param)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;function its hanging. i dnt know why. may be i thing &lt;STRONG&gt;uartUser_RxCallback &lt;/STRONG&gt;function also interrupt.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sudhakar p&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2015 09:57:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDMK64-SPI-INTERRUPT-ISSUE/m-p/427650#M2376</guid>
      <dc:creator>sudhakarp</dc:creator>
      <dc:date>2015-11-20T09:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: FRDMK64 SPI INTERRUPT ISSUE</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDMK64-SPI-INTERRUPT-ISSUE/m-p/427651#M2377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello sudhakar p:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The KSDK DSPI driver is based on interrupts. If you want to use it in polling mode you need to use the HAL layer instead. I recommend you to install the latest KSDK v1.3 and there is an example for DSPI in polling mode in the next path:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\Freescale\KSDK_1.3.0\examples\frdmk64f\driver_examples\dspi\dspi_polling&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 18:10:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/FRDMK64-SPI-INTERRUPT-ISSUE/m-p/427651#M2377</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-11-30T18:10:14Z</dc:date>
    </item>
  </channel>
</rss>

