Hi Team,
We are configuring SPI communication using DMA for reading and writing data from/to EEPROM. while configuring SPI with DMA ,references for SpiPhyTxDmaChannel (SpiPhyUnit),SpiPhyRxDmaChannel (SpiPhyUnit) and SpiPhyTxDmaChannelAux (SpiPhyUnit) these parameters are not available. As per parameter description and our understanding references for these parameters has to come from MCL module.
In out tool we don't see MCL module ,we would like to know whether we should get MCL module plug-in and static code from NXP.
Could you please help on these query ASAP.
Regards,
Ruturaj.
Hello @RuturajKhandare ,
In out tool we don't see MCL module ,we would like to know whether we should get MCL module plug-in and static code from NXP.
[Hung] Yes, could you please add the MCL module. If user use the DMA, the MCL is needed. Please check the "eclipse\plugins\Spi_TS_T2D35M10I1R0\doc\AUTOSAR_MCAL_SPI_IM.pdf" for more information.
Best regards,
Hung.
Hi, could you please specify product this question is related to? Thanks
Hi David,
We are using MPC5746R controller.
i have configured MCL module as mentioned below:
DmaHwChannel = eDMA_48 for DSPI_3_RX (SpiPhyRxDmaChannel) ,Priority : 0
DmaHwChannel = eDMA_49 for DSPI_3_TX (SpiPhyTxDmaChannel) ,Priority : 1
DmaHwChannel = eDMA_50 (SpiPhyTxDmaChannelAux) ,Priority : 2
i have configured SPI module as mentioned below:
Configure DSPI 3 for communication using DMA., also configured sequence end notification
I am trying to read data from external EEPROM
in Init Function:
MCL_Init()
SPI_Init();
In step Function:
f(JOB_OK == Spi_SetupEB(0, i_TxData,RxDataBufferPtr, 7))
{
/* Send the command to EEPROM */
if(JOB_OK != Spi_AsyncTransmit (0))
{
/* Return JOB_FAILED flag*/
i_Return = EEP_JOB_FAILED;
}
else
{
/* Return JOB_OK flag*/
i_Return = JOB_OK;
}
}
Spi_MainFunction_Handling();
After getting sequence end notification, I am getting data 0 in RX buffer ,Can you please tell whether any configuration or function call i am missing?
Regards,
Ruturaj.
Hello @RuturajKhandare ,
Normally we will call :
while (SPI_JOB_PENDING==Spi_GetSequenceResult(nSequence))
{
Spi_MainFunction_Handling(nSequence);
}
instead of just
Spi_MainFunction_Handling();
And could you please check if we have a signal in the SPI_RX pin.
Best regards,
Hung