HSE Firmware Update

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

HSE Firmware Update

Jump to solution
278 Views
HaiHoangSoftware
Contributor IV

Dear NXP team,

Currently, We are referring to HSE_DEMOAPP_S32K396_0_2_50_0 to see how to update new HSE firmware (AB SWAP to AB SWAP FW update).

The first step is that programs IVT and Encrypted HSE F/w V2 Image in Active Partition as below picture (mentioned in HSE_DEMOAPP_S32K396_0_2_50_0_ReadMe.pdf).

HaiHoangSoftware_0-1760603654989.png

In the Demo App, this step was done by TRACE32 script.

But in our project, we need to get new Encrypted HSE F/w V2 Image from tester tool via UDS CAN, then perform writing this image into Active Partition in this step.

Please help us verify if we can perform programming Encrypted HSE F/w V2 Image into Active Partition(PFLASH BLOCK0 or PFLASH BLOCK1) while SW is executing in Active Partition(PFLASH BLOCK 0) by Mem43 Flash Driver?

 

Thank you and best regards,

Hai Nguyen Hoang

0 Kudos
Reply
1 Solution
254 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @HaiHoangSoftware 

Generally speaking, read-while-write (RWW) is supported between blocks. So, when a block is being programmed or erased, this block cannot be accessed and the code must run from another block or from RAM.

Mem_43_INFLS driver provides a feature which can load access code to RAM memory in order to avoid RWW issues. For details, see section "3.6.3 Avoiding Read While Write" in user manual RTD_MEM_43_INFLS_UM.pdf. If this feature is enabled, you can program/erase the same block where the code is running from.
But if you want to keep interrupts enabled during the flash operations, it's better to avoid this situation - if your application is running from block 1 then load new pink file to block 0 and there will be no problem.

Regards,
Lukas

View solution in original post

0 Kudos
Reply
2 Replies
255 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @HaiHoangSoftware 

Generally speaking, read-while-write (RWW) is supported between blocks. So, when a block is being programmed or erased, this block cannot be accessed and the code must run from another block or from RAM.

Mem_43_INFLS driver provides a feature which can load access code to RAM memory in order to avoid RWW issues. For details, see section "3.6.3 Avoiding Read While Write" in user manual RTD_MEM_43_INFLS_UM.pdf. If this feature is enabled, you can program/erase the same block where the code is running from.
But if you want to keep interrupts enabled during the flash operations, it's better to avoid this situation - if your application is running from block 1 then load new pink file to block 0 and there will be no problem.

Regards,
Lukas

0 Kudos
Reply
237 Views
HaiHoangSoftware
Contributor IV
Hi,

It's clear for now.
Thanks for your support.

Regards,
Hai Nguyen Hoang.
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2187356%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHSE%20Firmware%20Update%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2187356%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EDear%20NXP%20team%2C%3C%2FP%3E%3CP%3ECurrently%2C%20We%20are%20referring%20to%26nbsp%3BHSE_DEMOAPP_S32K396_0_2_50_0%20to%20see%20how%20to%20update%20new%20HSE%20firmware%20(AB%20SWAP%20to%20AB%20SWAP%20FW%20update).%3C%2FP%3E%3CP%3EThe%20first%20step%20is%20that%20programs%20IVT%20and%20%3CFONT%20color%3D%22%23FF00FF%22%3E%3CSTRONG%3EEncrypted%20HSE%20F%2Fw%20V2%20Image%3C%2FSTRONG%3E%3C%2FFONT%3E%20in%20%3CFONT%20color%3D%22%2399CC00%22%3E%3CSTRONG%3EActive%20Partition%3C%2FSTRONG%3E%3C%2FFONT%3E%20as%20below%20picture%20(mentioned%20in%20HSE_DEMOAPP_S32K396_0_2_50_0_ReadMe.pdf).%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22HaiHoangSoftware_0-1760603654989.png%22%20style%3D%22width%3A%20614px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22HaiHoangSoftware_0-1760603654989.png%22%20style%3D%22width%3A%20614px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F361126iAE9C040D73B88DDE%2Fimage-dimensions%2F614x431%3Fv%3Dv2%22%20width%3D%22614%22%20height%3D%22431%22%20role%3D%22button%22%20title%3D%22HaiHoangSoftware_0-1760603654989.png%22%20alt%3D%22HaiHoangSoftware_0-1760603654989.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EIn%20the%20Demo%20App%2C%20this%20step%20was%20done%20by%20TRACE32%20script.%3C%2FP%3E%3CP%3EBut%20in%20our%20project%2C%20we%20need%20to%20get%20new%20%3CFONT%20color%3D%22%23FF00FF%22%3E%3CSTRONG%3EEncrypted%20HSE%20F%2Fw%20V2%20Image%3C%2FSTRONG%3E%3C%2FFONT%3E%20from%20tester%20tool%20via%20UDS%20CAN%2C%20then%20perform%20writing%20this%20image%20into%20%3CFONT%20color%3D%22%2399CC00%22%3E%3CSTRONG%3EActive%20Partition%3C%2FSTRONG%3E%3C%2FFONT%3E%20in%20this%20step.%3C%2FP%3E%3CP%3EPlease%20help%20us%20verify%20if%20we%20can%20perform%20programming%26nbsp%3B%3CFONT%20color%3D%22%23FF00FF%22%3E%3CSTRONG%3EEncrypted%20HSE%20F%2Fw%20V2%20Image%20%3C%2FSTRONG%3E%3CFONT%20color%3D%22%23000000%22%3Einto%20%3CSTRONG%3E%3CFONT%20color%3D%22%2399CC00%22%3EA%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FFONT%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSTRONG%3E%3CFONT%20color%3D%22%2399CC00%22%3Ective%20Partition%3C%2FFONT%3E%3C%2FSTRONG%3E(PFLASH%20BLOCK0%20or%20PFLASH%20BLOCK1)%20while%20SW%20is%20executing%20in%20%3CFONT%20color%3D%22%2399CC00%22%3E%3CSTRONG%3EActive%20Partition%3C%2FSTRONG%3E%3C%2FFONT%3E(PFLASH%20BLOCK%200)%20by%20Mem43%20Flash%20Driver%3F%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CFONT%20color%3D%22%23FF00FF%22%3E%3CFONT%20color%3D%22%23000000%22%3EThank%20you%20and%20best%20regards%2C%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23FF00FF%22%3E%3CFONT%20color%3D%22%23000000%22%3EHai%20Nguyen%20Hoang%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2187938%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20HSE%20Firmware%20Update%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2187938%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHi%2C%3CBR%20%2F%3E%3CBR%20%2F%3EIt's%20clear%20for%20now.%3CBR%20%2F%3EThanks%20for%20your%20support.%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%2C%3CBR%20%2F%3EHai%20Nguyen%20Hoang.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2187709%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20HSE%20Firmware%20Update%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2187709%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F247218%22%20target%3D%22_blank%22%3E%40HaiHoangSoftware%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGenerally%20speaking%2C%20read-while-write%20(RWW)%20is%20supported%20between%20blocks.%20So%2C%20when%20a%20block%20is%20being%20programmed%20or%20erased%2C%20this%20block%20cannot%20be%20accessed%20and%20the%20code%20must%20run%20from%20another%20block%20or%20from%20RAM.%3C%2FP%3E%0A%3CP%3EMem_43_INFLS%20driver%20provides%20a%20feature%20which%20can%20load%20access%20code%20to%20RAM%20memory%20in%20order%20to%20avoid%20RWW%20issues.%20For%20details%2C%20see%20section%20%223.6.3%20Avoiding%20Read%20While%20Write%22%20in%20user%20manual%20RTD_MEM_43_INFLS_UM.pdf.%20If%20this%20feature%20is%20enabled%2C%20you%20can%20program%2Ferase%20the%20same%20block%20where%20the%20code%20is%20running%20from.%20%3CBR%20%2F%3EBut%20if%20you%20want%20to%20keep%20interrupts%20enabled%20during%20the%20flash%20operations%2C%20it's%20better%20to%20avoid%20this%20situation%20-%20if%20your%20application%20is%20running%20from%20block%201%20then%20load%20new%20pink%20file%20to%20block%200%20and%20there%20will%20be%20no%20problem.%3C%2FP%3E%0A%3CP%3ERegards%2C%3CBR%20%2F%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E