I met a problem when I program flash. There is line containing 4 bytes to be programmed in the *.srec file. But the driver only supports 8 bytes write. Could I modify the following micro to 4 in file S32K142_features.h?
/* @brief P-Flash Erase sector command address alignment. */
#define FEATURE_FLS_PF_SECTOR_CMD_ADDRESS_ALIGMENT (8u)
/* @brief P-Flash Program check command address alignment. */
#define FEATURE_FLS_PF_CHECK_CMD_ADDRESS_ALIGMENT (8u)
Actually, I've tried to modify, but the function FLASH_DRV_Program() return error, because the FTFx_FSTAT equals to 160, and at the last of the function FLASH_DRV_CommandSequence() will check it. So I think the above two micro could not be modified easily.
/* Check if an error is occurred */
if ((FTFx_FSTAT & (FTFx_FSTAT_MGSTAT0_MASK | FTFx_FSTAT_FPVIOL_MASK | FTFx_FSTAT_ACCERR_MASK | FTFx_FSTAT_RDCOLERR_MASK)) != 0U)
ret = STATUS_ERROR;
Waiting for your reply!