When using Flash to emulate EEPROM, the data is only written to FlexRAM and not to FlexNVM

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

When using Flash to emulate EEPROM, the data is only written to FlexRAM and not to FlexNVM

Jump to solution
2,300 Views
813270556
Contributor I
When using the Flash EEPROM emulation feature of the S32K146 chip, I configured 32KB of FlexNVM as EEPROM Backup and 2KB of FlexRAM as EEPROM. During emulation, upon checking the memory, I found that the written data only resides in FlexRAM and has not been written to FlexNVM.
I am unsure of the reason behind this and would appreciate any assistance.
0 Kudos
Reply
1 Solution
2,280 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@813270556

After successfully executing the EEE partition command,the FlexNVM area (EEE_Flash) used as EEE backup is not visible to the CPU, and user code cannot directly access (read and write) this address mapping area, otherwise a bus error will occur and enter the kernel HardFault exception (default configuration) or BusFault exception (after using BusFault exception).
At the same time, in the Memory window of the debug interface, the EEE_Flash area is displayed as an unknown state (???).
https://mp.weixin.qq.com/s?__biz=MzI0MDk0ODcxMw==&mid=2247486584&idx=1&sn=3b8651b928edd19c642b17838a...

View solution in original post

0 Kudos
Reply
5 Replies
2,281 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@813270556

After successfully executing the EEE partition command,the FlexNVM area (EEE_Flash) used as EEE backup is not visible to the CPU, and user code cannot directly access (read and write) this address mapping area, otherwise a bus error will occur and enter the kernel HardFault exception (default configuration) or BusFault exception (after using BusFault exception).
At the same time, in the Memory window of the debug interface, the EEE_Flash area is displayed as an unknown state (???).
https://mp.weixin.qq.com/s?__biz=MzI0MDk0ODcxMw==&mid=2247486584&idx=1&sn=3b8651b928edd19c642b17838a...
0 Kudos
Reply
2,277 Views
813270556
Contributor I
How can I prove that the data I have written has been backed up to FlexNVM?
0 Kudos
Reply
2,265 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@813270556

After the MCU is powered off and restarted, FlexNVM can synchronize the backed-up data to the FlexRAM area. You can use this principle to confirm whether your last backup was successful.

0 Kudos
Reply
2,261 Views
813270556
Contributor I

@Senlent 

FlexRAM is used as EEPROM (with a size of 4KB), and FlexNVM is used as EEPROM Backup (with a size of 32KB). The chip I am using is S32K146.

When I write data, can the size of the written data exceed 4KB?

If so, how can the data exceeding 4KB be read from FlexNVM?

0 Kudos
Reply
2,251 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@813270556

This is not feasible

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2046872%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EWhen%20using%20Flash%20to%20emulate%20EEPROM%2C%20the%20data%20is%20only%20written%20to%20FlexRAM%20and%20not%20to%20FlexNVM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2046872%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%20class%3D%22%22%3EWhen%20using%20the%20Flash%20EEPROM%20emulation%20feature%20of%20the%20S32K146%20chip%2C%20I%20configured%2032KB%20of%20FlexNVM%20as%20EEPROM%20Backup%20and%202KB%20of%20FlexRAM%20as%20EEPROM.%20During%20emulation%2C%20upon%20checking%20the%20memory%2C%20I%20found%20that%20the%20written%20data%20only%20resides%20in%20FlexRAM%20and%20has%20not%20been%20written%20to%20FlexNVM.%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3EI%20am%20unsure%20of%20the%20reason%20behind%20this%20and%20would%20appreciate%20any%20assistance.%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2047108%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20When%20using%20Flash%20to%20emulate%20EEPROM%2C%20the%20data%20is%20only%20written%20to%20FlexRAM%20and%20not%20to%20FlexNVM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2047108%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3E813270556%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThis%20is%20not%20feasible%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2047055%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20When%20using%20Flash%20to%20emulate%20EEPROM%2C%20the%20data%20is%20only%20written%20to%20FlexRAM%20and%20not%20to%20FlexNVM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2047055%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F188029%22%20target%3D%22_blank%22%3E%40Senlent%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EFlexRAM%20is%20used%20as%20EEPROM%20(with%20a%20size%20of%204KB)%2C%20and%20FlexNVM%20is%20used%20as%20EEPROM%20Backup%20(with%20a%20size%20of%2032KB).%26nbsp%3BThe%20chip%20I%20am%20using%20is%20S32K146.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EWhen%20I%20write%20data%2C%20can%20the%20size%20of%20the%20written%20data%20exceed%204KB%3F%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIf%20so%2C%20how%20can%20the%20data%20exceeding%204KB%20be%20read%20from%20FlexNVM%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2047032%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20When%20using%20Flash%20to%20emulate%20EEPROM%2C%20the%20data%20is%20only%20written%20to%20FlexRAM%20and%20not%20to%20FlexNVM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2047032%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3E813270556%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAfter%20the%20MCU%20is%20powered%20off%20and%20restarted%2C%20FlexNVM%20can%20synchronize%20the%20backed-up%20data%20to%20the%20FlexRAM%20area.%20You%20can%20use%20this%20principle%20to%20confirm%20whether%20your%20last%20backup%20was%20successful.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2046992%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20When%20using%20Flash%20to%20emulate%20EEPROM%2C%20the%20data%20is%20only%20written%20to%20FlexRAM%20and%20not%20to%20FlexNVM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2046992%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20can%20I%20prove%20that%20the%20data%20I%20have%20written%20has%20been%20backed%20up%20to%20FlexNVM%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2046926%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20When%20using%20Flash%20to%20emulate%20EEPROM%2C%20the%20data%20is%20only%20written%20to%20FlexRAM%20and%20not%20to%20FlexNVM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2046926%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3E813270556%3C%2FSPAN%3E%3C%2FP%3E%0A%3CSECTION%3EAfter%20successfully%20executing%20the%20EEE%20partition%20command%2Cthe%20FlexNVM%20area%20(EEE_Flash)%20used%20as%20EEE%20backup%20is%20not%20visible%20to%20the%20CPU%2C%20and%20user%20code%20cannot%20directly%20access%20(read%20and%20write)%20this%20address%20mapping%20area%2C%20otherwise%20a%20bus%20error%20will%20occur%20and%20enter%20the%20kernel%20HardFault%20exception%20(default%20configuration)%20or%20BusFault%20exception%20(after%20using%20BusFault%20exception).%3C%2FSECTION%3E%0A%3CSECTION%3E%3C%2FSECTION%3E%0A%3CSECTION%3EAt%20the%20same%20time%2C%20in%20the%20Memory%20window%20of%20the%20debug%20interface%2C%20the%20EEE_Flash%20area%20is%20displayed%20as%20an%20unknown%20state%20(%3F%3F%3F).%3C%2FSECTION%3E%0A%3CSECTION%3E%3C%2FSECTION%3E%0A%3CSECTION%3E%3CA%20href%3D%22https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDk0ODcxMw%3D%3D%26amp%3Bmid%3D2247486584%26amp%3Bidx%3D1%26amp%3Bsn%3D3b8651b928edd19c642b17838a8c75bd%26amp%3Bchksm%3De91248fede65c1e87214ce913baab45431f816d0bfd0362e00aea1ed4232f200d5ae2720cd71%26amp%3Bscene%3D21%23wechat_redirect%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzI0MDk0ODcxMw%3D%3D%26amp%3Bmid%3D2247486584%26amp%3Bidx%3D1%26amp%3Bsn%3D3b8651b928edd19c642b17838a8c75bd%26amp%3Bchksm%3De91248fede65c1e87214ce913baab45431f816d0bfd0362e00aea1ed4232f200d5ae2720cd71%26amp%3Bscene%3D21%23wechat_redirect%3C%2FA%3E%3C%2FSECTION%3E%0A%3CSECTION%3E%3C%2FSECTION%3E%3C%2FLINGO-BODY%3E