Oct 19, 2020
07:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 19, 2020
07:07 AM
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?
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?
- Tags:
- IFX
5 Replies
Oct 19, 2020
08:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 19, 2020
08:51 AM
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.
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.
Oct 19, 2020
10:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 19, 2020
10:11 PM
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.
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.
Oct 19, 2020
11:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 19, 2020
11:39 PM
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?
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?
Oct 20, 2020
12:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 20, 2020
12:55 AM
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.
Oct 20, 2020
04:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 20, 2020
04:11 AM
This is what've done, it's working well. Thank you for your replies.
This widget could not be displayed.