Example MCAL S32K310 MEM_InFls DS3.5 RTD300

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

Example MCAL S32K310 MEM_InFls DS3.5 RTD300

Example MCAL S32K310 MEM_InFls DS3.5 RTD300

*******************************************************************************

 The purpose of this demo application is to present a usage of the
MEM_InFls MCAL Driver for the S32K3x1 MCU.

 The example uses MEM_InFls driver to write 128 bytes to FLASH memory address  0x47_A000   starting of FLS_CODE_ARRAY_0_BLOCK_0_S61.

 ------------------------------------------------------------------------------
* MCU: S32K310
* Compiler: S32DS3.5
* SDK release: RTD 3.0.0
* Debugger: PE micro
* Target: internal_FLASH
********************************************************************************

Flash end address = 0x480000
Size of each block = 8192 = 0x2000
Start Address of 63 block = 0x480000 - 0x2000 = 0x47E000 = 4710400
Start Address of 62 block = 0x480000 - 0x4000 = 0x47C000 = 4702208
Start Address of 61 block = 0x480000 - 0x6000 = 0x47A000 = 4694016

Dinesh_Guleria_0-1718364360578.png

 




Ram location where FLASH writing erase code is placed :--
I placed the code at 0x256 byte below the MAX address of the RAM size
16*1024 = 16384 = 0x4000
End of RAM = 0x20400000 + 0x4000 = 0x20404000 
0x20404000 - 0x256 = 0x20403DAA
0x20403DAA = 541081002

Dinesh_Guleria_1-1718266554663.png



Dinesh_Guleria_0-1718364786623.png

 




Size of RAM need to save the flashing routine, as per the MAP & linker file :--
0x00407b80 - 0x00407b54 = 0x2C = 44 byte

Dinesh_Guleria_3-1718266617924.png



 S32K3 FLASH Memory Terminology :--

Dinesh_Guleria_0-1718357967160.png

 


 

Dinesh_Guleria_1-1718358007577.png

 


Dinesh_Guleria_2-1718358034481.png

 

Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1886775%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20MCAL%20S32K310%20MEM_InFls%20DS3.5%20RTD300%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1886775%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%3CP%3E%3CSPAN%3E*******************************************************************************%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3BThe%20purpose%20of%20this%20demo%20application%20is%20to%20present%20a%20usage%20of%20the%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EMEM_InFls%20MCAL%20Driver%20for%20the%20S32K3x1%20MCU.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3BThe%20example%20uses%20MEM_InFls%20driver%20to%20write%20128%20bytes%20to%20FLASH%20memory%20address%26nbsp%3B%20%3CSTRONG%3E0x47_A000%3C%2FSTRONG%3E%26nbsp%3B%20%26nbsp%3Bstarting%20of%20%3CSTRONG%3EFLS_CODE_ARRAY_0_BLOCK_0_S61%3C%2FSTRONG%3E.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3B------------------------------------------------------------------------------%3CBR%20%2F%3E*%20MCU%3A%20S32K310%3CBR%20%2F%3E*%20Compiler%3A%20S32DS3.5%3CBR%20%2F%3E*%20SDK%20release%3A%20RTD%203.0.0%3CBR%20%2F%3E*%20Debugger%3A%20PE%20micro%3CBR%20%2F%3E*%20Target%3A%20internal_FLASH%3CBR%20%2F%3E********************************************************************************%3CBR%20%2F%3E%3CBR%20%2F%3EFlash%20end%20address%20%3D%200x480000%3CBR%20%2F%3ESize%20of%20each%20block%20%3D%208192%20%3D%200x2000%3CBR%20%2F%3EStart%20Address%20of%2063%20block%20%3D%200x480000%20-%200x2000%20%3D%200x47E000%20%3D%204710400%3CBR%20%2F%3EStart%20Address%20of%2062%20block%20%3D%200x480000%20-%200x4000%20%3D%200x47C000%20%3D%204702208%3CBR%20%2F%3EStart%20Address%20of%2061%20block%20%3D%200x480000%20-%200x6000%20%3D%20%3CSTRONG%3E0x47A000%3C%2FSTRONG%3E%20%3D%204694016%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_0-1718364360578.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_0-1718364360578.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284229iD615D55808D4FAC3%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_0-1718364360578.png%22%20alt%3D%22Dinesh_Guleria_0-1718364360578.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3ERam%20location%20where%20FLASH%20writing%20erase%20code%20is%20placed%20%3A--%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EI%20placed%20the%20code%20at%200x256%20byte%20below%20the%20MAX%20address%20of%20the%20RAM%20size%3C%2FSPAN%3E%3CBR%20%2F%3E16*1024%20%3D%2016384%20%3D%200x4000%3CBR%20%2F%3EEnd%20of%20RAM%20%3D%200x20400000%20%2B%200x4000%20%3D%200x20404000%26nbsp%3B%3CBR%20%2F%3E0x20404000%20-%200x256%20%3D%200x20403DAA%3CBR%20%2F%3E%3CSTRONG%3E0x20403DAA%3C%2FSTRONG%3E%20%3D%20541081002%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_1-1718266554663.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_1-1718266554663.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F283920iB0A198B1A414AA40%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_1-1718266554663.png%22%20alt%3D%22Dinesh_Guleria_1-1718266554663.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_0-1718364786623.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_0-1718364786623.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284231i20B7CBFDFA6FB385%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_0-1718364786623.png%22%20alt%3D%22Dinesh_Guleria_0-1718364786623.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3ESize%20of%20RAM%20need%20to%20save%20the%20flashing%20routine%2C%20as%20per%20the%20MAP%20%26amp%3B%20linker%20file%20%3A--%3C%2FSPAN%3E%3CBR%20%2F%3E0x00407b80%20-%200x00407b54%20%3D%200x2C%20%3D%2044%20byte%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_3-1718266617924.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_3-1718266617924.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F283922i70879EF7D5AE8979%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_3-1718266617924.png%22%20alt%3D%22Dinesh_Guleria_3-1718266617924.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3BS32K3%20FLASH%20Memory%20Terminology%20%3A--%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_0-1718357967160.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_0-1718357967160.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284208i898F4B7E18F2A49A%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_0-1718357967160.png%22%20alt%3D%22Dinesh_Guleria_0-1718357967160.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_1-1718358007577.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_1-1718358007577.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284209iC6FCAF933EA18A5C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_1-1718358007577.png%22%20alt%3D%22Dinesh_Guleria_1-1718358007577.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Dinesh_Guleria_2-1718358034481.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Dinesh_Guleria_2-1718358034481.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284210iDE29A005F05585B7%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Dinesh_Guleria_2-1718358034481.png%22%20alt%3D%22Dinesh_Guleria_2-1718358034481.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎06-14-2024 04:33 AM
Updated by: