S32K144: How to read Data flash 0 IFR

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K144: How to read Data flash 0 IFR

ソリューションへジャンプ
3,292件の閲覧回数
damiendusha
Contributor II

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.

0 件の賞賛
返信
1 解決策
2,867件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

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

元の投稿で解決策を見る

3 返答(返信)
2,868件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

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

2,867件の閲覧回数
damiendusha
Contributor II

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:

pastedImage_7.png

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.

0 件の賞賛
返信
2,866件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

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. 

pastedImage_1.png

Regards,

Daniel