Hi
Please share if anyone have a sample project of QSPI implementation in S32K3. I'm trying to implement QSPI but there is no sample project available in S32DS.
Regards,
Abhijith Raj
Hi @davidtosenovjan ,
I checked this example project. In this project I added some LUT in mex file. But when I call "Qspi_Ip_RunReadCommand" function with this LUT index, inside this function i am getting the LUT properly. But inside this another function "Qspi_Ip_IpRead" is being called. But when I check the LUT there, it is showing 0.
I am just mentioning the function definition of Qspi_Ip_RunReadCommand. Please check it.
Qspi_Ip_StatusType Qspi_Ip_RunReadCommand(uint32 instance,
uint16 lut,
uint32 addr,
uint8 * dataRead,
const uint8 * dataCmp,
uint32 size
)
{
Qspi_Ip_StatusType status = STATUS_QSPI_IP_SUCCESS;
const Qspi_Ip_StateType * state = &(Qspi_Ip_MemoryStateStructure[instance]);
DEV_ASSERT_QSPI(instance < QSPI_IP_MEM_INSTANCE_COUNT);
DEV_ASSERT_QSPI(lut != QSPI_IP_LUT_INVALID);
DEV_ASSERT_QSPI(addr < state->configuration->memSize);
DEV_ASSERT_QSPI((size > 0UL) && ((addr + size) <= state->configuration->memSize));
if (QSPI_IP_LUT_INVALID == lut)
{
status = STATUS_QSPI_IP_ERROR;
}
else
{
/* Copy sequence in LUT registers */
(void)Qspi_Ip_InitLutSeq(instance, lut, QSPI_IP_COMMAND_LUT);
/* Run QSPI command */
status = Qspi_Ip_IpRead(state->connection->qspiInstance, QSPI_IP_COMMAND_LUT, state->baseAddress + addr, dataRead, dataCmp, size);
}
return status;
}
My doubt is why we are passing QSPI_IP_COMMAND_LUT as an argument in Qspi_Ip_IpRead()