Dear all,
I have an application where I need to configure the Data Flash 0 IFR to configure the D-Flash/E-Flash. The process to write is straightforward as per "Program Partition" command in RM s36.5.11.14 (p836).
However, there does not appear to be a means of reading the Data Flash 0 IFR to confirm that the configuration is correctly written. For the Kinetis, it appears it can be done via the "Read Resource" command, but this feature is not available on the S32K144 device:
/* @brief Has 0x03 Read Resource command. */
#define FEATURE_FLS_HAS_READ_RESOURCE_CMD (0u)
So, is there an alternate means of reading this section, or any other way in which the partitioning can be verified in software?
-- Damien.
Solved! Go to Solution.
Hello Damien,
There is no such command and the IFR is not mapped, however, the DEPART value can be read from FCFG1[DEPART] register. Please see section 11.3.1.10 in the S32K1xx RM rev.9
Regards,
Daniel
Hello Damien,
There is no such command and the IFR is not mapped, however, the DEPART value can be read from FCFG1[DEPART] register. Please see section 11.3.1.10 in the S32K1xx RM rev.9
Regards,
Daniel
Hi Daniel,
Thanks, I have been able to verify the DEPART value, but I would like to ask about the EEERAMSIZE field in FCFG1[DEPART].
I can can setup D-Flash partitioning without any problems using the FLASH_DRV driver.
const uint8_t uEEEDataSizeCode = 0x0F;
const uint8_t uDEPartitionCode = 0x00;
const uint8_t uCSEcKeySize = 0x00;
const bool uSFE = false;
const bool flexRamEnableLoadEEEData = false;const status_t ok = FLASH_DRV_DEFlashPartition(
&m_flashSSDConfig,
uEEEDataSizeCode,
uDEPartitionCode,
uCSEcKeySize,
uSFE,
flexRamEnableLoadEEEData);
The function reports success with these values.
However, after rebooting the DEPART value is correct, but the EEESRAMSIZE reports as 0x02 (4KB). I would have expected this to be 0x0F as per s10.3.11.10.4:
SIM->FCFG1 = 0xFF020000
It's worth noting, however, that the FCNFG[RAMDRY] report that Flex is available as traditional RAM only:
FTFC->FCNFG = 0x02
Is this the expected behavior of the device? Is the D-Flash safe to use, even if the EEESRAMSIZE reports a value other than 0KB?
Kind regards,
Damien.
Hi Damien,
The EEERAMSIZE bit-field doesn't get updated, it is always 0x2 (4KB). The NOTE is Section 11.3.1.10.2 (RM rev.9) mentions DEPART only. The FlexRAM can be used either as RAM or EEPROM, in either way, it is 4KB.
Regards,
Daniel