SDK 1.3 DSPI interrupt handler issue

cancel
Showing results for 
Search instead for 
Did you mean: 

SDK 1.3 DSPI interrupt handler issue

248 Views
rhermes
Contributor I

SDK 1.3 DSPI issue.

 

I am attempting to use the DSPI driver functions.  They appear to initialize properly, but when I do a blocking transfer it never comes back.

Looking at the link map it appears that the default interrupt handler is still installed for SPI.

I am using the SDK and MQX as libraries.

The SDK build includes fsl_dspi_irq.c.

What can cause SPI2_IRQHandler() to not be linked into the SPI interrupt vector.

I'm building everything for MK22FX processor.

Labels (1)
0 Kudos
2 Replies

70 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Randy,

- The spi interrupt function is "SPI2_IRQHandler()"?

Please tell me the whole part number of your chip , how many SPI module does it have ?

- You can check the register about SPI interrupt , check whether the interrupt flag set ?

  whether enable the interrupt  ?

- Under KSDK 1.3 , there is one SPI demo , i think you  can refer to :

     KSDK_1.3.0\rtos\mqx\mqx\examples\dspi

Hope it helps

Alice

0 Kudos

70 Views
rhermes
Contributor I

Hi Alice,

Thank you for the response - sorry for taking so long to get back to you.

     Switched to another project, but I'm back working on the SPI now.

     The good news is that I have the interrupts working now.

     Turns out I needed to set the interrupt handler using the MQX _int_install_isr() function since I am using MQX.  duh!

Now I have a new problem.

     In my initialization code I read the ID information from a flash chip that is on the SPI bus.

If I run at full speed I get a task error MQX_UNHANDLED_INTERRUPT (0x0041)

     Which is vector 65, the SPI2 interrupt vector.

     In addition it appears the unhandled interrupt repeats indefinitely.

If I set a breakpoint at DSPI_DRV_MasterCompleteTransfer(), OSA_SemaPost(&dspiState->irqSync);

     then run after the breakpoint the SPI read completes properly and I don't get the task error.

If I remove the breakpoint at DSPI_DRV_MasterCompleteTransfer(), OSA_SemaPost(&dspiState->irqSync) and

     set a breakpoint at DSPI_DRV_MasterTransferBlocking(), if (syncStatus != kStatus_OSA_Success); just after the OSA_SemaWait call,

     it never gets there but ends up in the unhandled interrupt looping state.

Any advice is appreciated.

I'm running on a MK22FX512AVLQ12, using SDK 1.3 and MQX that is included in the SDK.

Thank You

Randy

0 Kudos