While going through the example code for S32K Flash Partitioning in S32DS, I found an issue with the generated config file (peripherals_flash_FTFC.c).
The flash configuration is generated as below :
/* Flash user configuration 0 */
const flash_user_config_t Flash_InitConfig0 =
{
.PFlashBase = 0x0U,
.PFlashSize = 0x80000U,
.DFlashBase = 0x10000000U,
.EERAMBase = 0x14000000U,
.CallBack = NULL
};
Here, the CallBack is asigned a value equivalent to NULL => (((void *)0)
In the file flash_driver.c, to check if we have defined a callback or not, the comparision is done with
NULL_CALLBACK.
if (NULL_CALLBACK != pSSDConfig->CallBack)
{
(pSSDConfig->CallBack)();
}
Upon executing this example from RAM, my code is going into a fault. When i made the necessary correction, it seems to work ok.
I believe it should either be NULL or NULL_CALLBACK but same should be used everywhere.
Is there something which I am missing or is there a genuine issue here?
Kindly help.
Hi
What version of S32K1 SDK are you using? Looks like it's fixed in newer versions of the SDK (I imported the flash_partitioning_s32k144 example with S32DS v3.4 + S32K1 SDK RTM 4.0.3)
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Robin,
I am using below versions:
S32K144_SDK v4.0.1 with S32Ds v3.5.
Thanks for your quick support.
Currently S32DS v3.5 cannot update S32K1 SDK to the latest RTM 4.0.3 version, so I suggest you use S32DS v3.4.
Sorry for the inconvenience we bring you!