EEEPROM S32K144

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

EEEPROM S32K144

4,636 Views
Alex19
Contributor II

Hello, 

Could you help me please with my project. I need to use the memory of the board S32K144. It means i need to receive the data by uart, write into the memory and after read. I saw the Example_S32K144_EEEPROM_usage, I take the function EEE_Write_ByteArray(), I can read the data, but i lose them after disconnect the board from power 12V. And actually I would like to use the function of FLASH, for example, FLASH_DRV_EEEWrite().

I attached my project. 

0 Kudos
Reply
9 Replies

4,614 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Alex19

There is a sample code "flash_partitioning_s32k144" in SDK.

The examples does the following operations:
- Partitions the flash
- Configures FlexNVM region as EEPROM
- Erases flash
- Programs flash
- Write data to EEPROM.

So,please refer to this example.

BR!

     Jim,

0 Kudos
Reply

4,598 Views
Alex19
Contributor II

Hi, 

Thank you for your support, but unfortunately it doesn't work. Can you guide me to the right direction, please. so my steps are next:

1. Initialization of flash 

2. Configure FlexRAM as EEPROM 

3 . Write data to EEPROM

4. Read data 

So my code 

- FLASH_DRV_Init(&Flash_InitConfig0, &flashSSDConfig);

- FLASH_DRV_DEFlashPartition(&flashSSDConfig, 0x02u, 0x08u, 0x0u, false, true);
- FLASH_DRV_SetFlexRamFunction(&flashSSDConfig, EEE_ENABLE, 0x00u, NULL);

- FLASH_DRV_EEEWrite(&flashSSDConfig, flashSSDConfig.EERAMBase, sizeof(Array), Array);

- memcpy(SendArray,&flashSSDConfig.EERAMBase,sizeof(SendArray));

What i'm doing wrong? 

BR

0 Kudos
Reply

4,578 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Alxe19

It works fine on my side,so please check again.

Senlent_0-1637920248550.pngSenlent_0-1637920248550.pngSenlent_1-1637920327565.pngSenlent_1-1637920327565.png

BR!

    Jim,

 

0 Kudos
Reply

4,568 Views
Alex19
Contributor II

I have this results

Alex19_0-1637934469165.pngAlex19_0-1637934469165.png

 

0 Kudos
Reply

4,526 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Alex19

Hi  Alex,

    Please set some breakpoints, 

    I tried again and the result was the same.

Senlent_0-1638168835043.pngSenlent_0-1638168835043.png

I‘m using:

IDE: S32 Design Studio for ARM 2018 or Keil

SDK:S32K1xx RTM SDK 3.0.0

Hardware:S32K142EVB.

 

BR!

      Jim,

 

 

0 Kudos
Reply

4,520 Views
Alex19
Contributor II

Hello,

Thank you for your reply. Can you tell me please, is it normal, when i debug the project i have the expected result like this 

Alex19_0-1638175481416.pngAlex19_0-1638175481416.png

but when I click the button Resume F8, i have this 

Alex19_1-1638175557335.pngAlex19_1-1638175557335.png

BR

0 Kudos
Reply

4,507 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Alex19

Hi Alex,

   you can try single-step debugging to find the reason,I can't judge the root casue based on the picture you provided.I have tried several times and there is no such problem.

BR!

     Jim,

0 Kudos
Reply

4,501 Views
Alex19
Contributor II

hi Jim,

I tried with single-step debugging and it works fine, it means I go step by step until the end of the code

(Debug ->Debug Configuration -> flash_partitioning_s32k144_debug_flash_premicro -> Step over->I push "step over" until the end of the code).

But if I run full-speed running mode it doesn't work (Debug ->Debug Configuration -> flash_partitioning_s32k144_debug_flash_premicro -> Resume)

Maybe there is some configuration? 

0 Kudos
Reply

4,467 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Alex19

      The debugger may not be able to read the contents of the memory when running at full speed,so breakpoints and single-step debugging are necessary.

0 Kudos
Reply