Nilesh Khunte

QSPI Interrupt service routine  is not getting fired

Discussion created by Nilesh Khunte on Jul 23, 2012
Latest reply on Jul 23, 2012 by TomE

Hi,

I am using MCF5282 Evaluation board for development

 

I am writing a SPI interrupt based driver for MCF5282 controller

 

Functional QSPI Description:-

The user initiates QSPI operation by loading a queue of commands in command RAM, writing transmit data into transmit RAM,

and then enabling the QSPI data transfer. The QSPI executes the queued commands and sets the completion flag in the QSPI

interrupt register (QIR[SPIF]) to signal their completion. As another option, QIR[SPIFE] can be enabled to generate an interrupt.

 

Our Problem:-

 

It sets on the QSPI finish flag in QIR register once QSPI completes all the commands in the queue

but interrupt is not getting fired .I have enabled the SPIFE bit in QIR register ie 1-QSPI interrupt enabled.

 

I have done the following changes 

1)      Vectors5282.s File

vector52:   .long _QSPI_SPI_TransmitInterrupt /* QSPI Transmit*/

 

Interrupt Vector Determination

18    QSPI    Multiple QSPI interrupt    See QIR description

 

For INTC0, vector_number = 64 + interrupt source number

 

For QSPI= 64+18 =82 (decimal) 52H(Hex)

 

2)      QSPI module  .c  File

#pragma interrupt on

 

void QSPI_TransmitInterrupt(void)

{

}

#pragma interrupt off

 

3)      In initialization routine I am doing the below things

A) MCF5282_INTC0_ICR18 = MCF5282_INTC_ICR_IL(4) | MCF5282_INTC_ICR_IP(2 ); // Level and priority

B) MCF5282_INTC0_IMRL &= ~MCF5282_INTC_IMRL_INT18;  // Clear mask bit for this interrupt

 

Please let me know if i missed any step  

 

Regards

Nilesh

Outcomes