Support for MCL module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Support for MCL module

2,667 Views
RuturajKhandare
Contributor I

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.

 

 

0 Kudos
Reply
4 Replies

2,653 Views
hungnguyenphi
NXP Employee
NXP Employee

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.

hungnguyenphi_0-1620894288869.png

Best regards,

Hung.

0 Kudos
Reply

2,659 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, could you please specify product this question is related to? Thanks

0 Kudos
Reply

2,632 Views
RuturajKhandare
Contributor I

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.

 

 

 

0 Kudos
Reply

2,572 Views
hungnguyenphi
NXP Employee
NXP Employee

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

0 Kudos
Reply