- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried to use Cy_SMIF_MemWrite() with ModusToolbox and it always returned a timeout error.
I have QSPI FRAM configured for full QSPI operation.
The problem is in Cy_SMIF_MemCmdReadStatus() function as it only uses CY_SMIF_WIDTH_SINGLE for WIP flag reading.
I have modified the function and it now works correctly:
cy_en_smif_status_t Cy_SMIF_MemCmdReadStatus(SMIF_Type *base,
cy_stc_smif_mem_config_t const *memDevice,
uint8_t *status,
uint8_t command,
cy_stc_smif_context_t const *context)
{
cy_en_smif_status_t result = CY_SMIF_CMD_NOT_FOUND;
/* Read the memory status register */
result = Cy_SMIF_TransmitCommand( base, command, memDevice->deviceCfg->readStsRegWipCmd->cmdWidth,
NULL, CY_SMIF_CMD_WITHOUT_PARAM,
CY_SMIF_WIDTH_NA, memDevice->slaveSelect,
CY_SMIF_TX_NOT_LAST_BYTE, context);
if (CY_SMIF_SUCCESS == result)
{
result = Cy_SMIF_ReceiveDataBlocking( base, status,
CY_SMIF_READ_ONE_BYTE, memDevice->deviceCfg->readStsRegWipCmd->cmdWidth, context);
}
return(result);
}
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Gintaras ,
I am not sure why the transfer width was hardcoded to CY_SMIF_WIDTH_SINGLE. It should be taking the transfer widths from the values configured in the QSPI configurator.
Also, this is not the only function that might be affected by this. You might want to do the same changes to Cy_SMIF_MemCmdWriteStatus as well.
Thanks for pointing this out. The modifications you have made seem right. I will pass this on to the internal team for evaluation.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Gintaras ,
I am not sure why the transfer width was hardcoded to CY_SMIF_WIDTH_SINGLE. It should be taking the transfer widths from the values configured in the QSPI configurator.
Also, this is not the only function that might be affected by this. You might want to do the same changes to Cy_SMIF_MemCmdWriteStatus as well.
Thanks for pointing this out. The modifications you have made seem right. I will pass this on to the internal team for evaluation.
Regards,
Dheeraj