s32k116 demo板的flash 读写例子

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k116 demo板的flash 读写例子

3,745 Views
814420552
Contributor III

麻烦是否可以将s32k116 demo板的flash 读写例子能否提供一个? 还有Dflash操作例子也提供一个

6 Replies

2,593 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I recommend to download [S32 SDK for S32K1 microcontrollers] from here.

After downloaded, there provides [flash_partitioning_s32k116] shows how to operation Flash and FlexNVM working for EEPROM.

Below is the project description for your reference:

Writes, verifies and erases data on Flash
The FlexNVM memory is partitioned to EEPROM use and is blocked for some erase commands (Erase Sector and Erase Block). As a consequence, loading the program to flash memory may fail on some debuggers. Please perform a mass erase operation on Flash to remove this partitioning after running the example to be able to update your application on target.
The example documentation can be found in the S32 SDK documentation at Examples and Demos section. (<SDK_PATH>/doc/Start_Here.html)

Wish it helps


Have a great day,
Mike

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

2,593 Views
814420552
Contributor III

S32K116 32位  8位  16位读写flash 效率是多少呢  有多高,我有个项目需要实时保存数据

0 Kudos
Reply

2,593 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Please check page 36 Table 24. Flash command timing specifications for S32K11x of S32K1xx MCU datasheet.

Wish it helps.

best regards,

Mike

0 Kudos
Reply

2,593 Views
814420552
Contributor III

S32K16demo板子烧写程序出现了Invalid rom  table 错误是什么原因呢、?

我猜测是因为我之前写过如下程序导致的,这个程序是s32k148中的操作flash、例子的一部分

#if ((FEATURE_FLS_HAS_FLEX_NVM == 1u) & (FEATURE_FLS_HAS_FLEX_RAM == 1u))
//Config FlexRAM as EEPROM if it is currently used as traditional RAM
if (flashSSDConfig.EEESize == 0u)
{
#ifndef FLASH_TARGET
//First, erase all Flash blocks if code is placed in RAM to ensure
//the IFR region is blank before partitioning FLexNVM and FlexRAM
      ret = FLASH_DRV_EraseAllBlock(&flashSSDConfig);
      if (ret != STATUS_SUCCESS)
      {
            return ret;
      }

//Verify the erase operation at margin level value of 1
   ret = FLASH_DRV_VerifyAllBlock(&flashSSDConfig, 1u);
   if (ret != STATUS_SUCCESS)
   {
        return ret;
   }


address = 0x40Cu;
size = FTFx_LONGWORD_SIZE;

ret = FLASH_DRV_Program(&flashSSDConfig, address, size, unsecure_key);
if (ret != STATUS_SUCCESS)
{
   return ret;
}
#endif // FLASH_TARGET

// Configure FlexRAM as EEPROM and FlexNVM as EEPROM backup region,
//DEFlashPartition will be failed if the IFR region isn't blank.
// Refer to the device document for valid EEPROM Data Size Code
//and FlexNVM Partition Code. For example on S32K148:
// - EEEDataSizeCode = 0x02u: EEPROM size = 4 Kbytes
//- DEPartitionCode = 0x04u: EEPROM backup size = 64 Kbytes
ret = FLASH_DRV_DEFlashPartition(&flashSSDConfig, 0x02u, 0x04u, 0x0u, false, true);
if (ret != STATUS_SUCCESS)
{
   return ret;
}

如果我想设置SRAM启动该怎么设置呢?还有这个S32K116的SRAM只有14K吗还是多少呢

0 Kudos
Reply

2,593 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi

pastedImage_1.png

RAM boot need bootloader, please refer AN12218 about S32K1xx Bootloader and related AN12218SW software.

pastedImage_2.png

Total SRAM is 17KB. If using FlexRAM for FlexNVM, the left SRAM size is 15KB.

best regards,

Mike

0 Kudos
Reply

2,593 Views
814420552
Contributor III

按照你们的SDK 中你们falsh例子中的操作步骤我在S32 Design stdio 中并没有找到S32K116的 example code  只看到了144,148的,急用,能否发一个116的给我,谢谢

0 Kudos
Reply