TC27X QSPI Phase Transition callback is never executed

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User20458
Level 1
Level 1
Hello,

The question is on the TC27X QSPI (master mode without DMA) phase transition interrupt part.

The QSPI phase transition interrupt is initialized like explained in the iLLD QSPI “Phase transition and User Interrupt usage” documentation. Unfortunately, the phase transition callback is never executed.

Parallelly the QSPI Tx and Rx interrupt are successfully used, the callbacks are executed.

I did a test where I call the IfxQspi_SpiMaster_isrPhaseTransition function in the Tx and Rx interrupt callback to see whether the phase transition event (IfxQspi_PhaseTransitionEvent_startOfFrame and IfxQspi_PhaseTransitionEvent_endOfFrame
) are returned. That is also the case.

Did someone use it successfully?
0 Likes
5 Replies
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
How you setup the interrupt?
Phase transition and user defined interrupts are not configured internal in the driver, you must do this by your own software. RX and TX are configured by driver, maybe this is the difference.
0 Likes
User20458
Level 1
Level 1
Hi MoD,

Thank you for your reply. We have just followed the instruction of the iLLD documentation:

IfxCpu_Irq_installInterruptHandler( reinterpret_cast< void* >( m_aFpSpi[m_u32SpiNumber][U32_SPI_PRIO_POS_PT] ),
m_au32SpiIsrPrios[ m_u32SpiNumber ][ U32_SPI_PRIO_POS_PT ] );

IfxQspi_pause( m_IfxSpiRegister[m_u32SpiNumber] );

IfxQspi_configPT1Event( m_IfxSpiRegister[m_u32SpiNumber], IfxQspi_PhaseTransitionEvent_startOfFrame );
IfxQspi_enablePT1Event( m_IfxSpiRegister[m_u32SpiNumber], TRUE );

IfxQspi_configPT2Event( m_IfxSpiRegister[m_u32SpiNumber], IfxQspi_PhaseTransitionEvent_endOfFrame );
IfxQspi_enablePT2Event( m_IfxSpiRegister[m_u32SpiNumber], TRUE );

IfxQspi_run( m_IfxSpiRegister[m_u32SpiNumber] );

The interrupt callbacks have this prototype void CDriverSpi0M3PtCHook( void )

The arrays m_aFpSpi and m_IfxSpiRegister are used also for Tx and Rx interrupts, the index are right.
0 Likes
User20458
Level 1
Level 1
It seems now to work. I had I look in the IfxQspi_SpiMaster_initModule function to see how the Rx / Tx / Er interrupts are initialized.
And, try to do the same with the PT interrupt: IfxSrc_init...
The callback is now executed. Is that the right way to do it?
0 Likes
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
Yes, there is missing the setup of the service request node. The init_module configure only the RX and TX service request node. As you do, the service request node for the PT interrupt must be done in your software. Unfortunately there is no function for PT interrupt like IfxQspi_getTransmitSrc. You must write an own function similar to IfxQspi_getTransmitSrc.
0 Likes
User20458
Level 1
Level 1
This is what've done, it's working well. Thank you for your replies.
0 Likes