simEEPROMWriteFlash

Top  Next

simEEPROMWriteFlash


Write simulated EEPROM Flash

Since R2019b

 

Library: embeddedCreatorLib ( Dafulai Electronics) / Simulate EEPROM by Flash / simEEPROMWriteFlash

 

 

simEEPROMWriteFlash

 

 


 

Description


 

This block writes Flash for "Simulated EEPROM". If all "SRAM" data for "Simulated EEPROM" are the same as "Flash" data,  this block will not do actual writing to flash but output port "OK" still be true.  This way will save CPU time because Programming flash needs lots of time (Erase page/sector and writing to page/sector), and during programming to flash, all interrupts will be disabled.   If any of "SRAM" data for "Simulated EEPROM" is different from "Flash" data, when "En"= true, this block will disable all "interrupts" and  "erase/program flash page or sector".

 

 

 

Parameters


 

 

Sample time in sec (-1 for inherited): — Sample time for this block. It is the same meaning as general Simulink block .

 

 

Ports


 

Input

 

En — "logical" data type's scalar. True means "Do writing to flash". False means "Disable writing to flash"

 

 

Outport


 

OK — "logical" data type's scalar. True means "Writing Flash successfully and verify pass".

 

 

 

Examples